Quickstart Guide#
This guide will help you get started with matrice by walking you through basic operations like creating a session, checking account details, and creating a project.
Creating a Session#
To begin using matrice, you need to create a session. This session will be used to interact with the Matrice platform.
from matrice.session import Session
# Create a new session with your API key
session = Session(account number = "account number")
# Verify the session
if session:
print("Session created successfully!")
else:
print("Failed to create session.")
Checking Account Details#
Once you have a session, you can check your account details to ensure everything is set up correctly.
# Get account details
account_info = session.get_account_details()
# Print account information
print(f"Account Name: {account_info['name']}")
print(f"Account Email: {account_info['email']}")
print(f"Projects Count: {account_info['projects_count']}")
Creating a Project#
You can create a new project on the Matrice platform using the following code:
# Create a new project
project = session.create_project(
name="My First Project",
description="This is a test project."
)
# Print project ID
print(f"Project created successfully with ID: {project['id']}")
Exploring the Project#
Once the project is created, you can explore and manage its components:
# Get all projects in your account
projects = session.list_projects()
print(f"You have {len(projects)} projects in your account.")
# Get details of a specific project
project_id = projects[0]['id']
project_details = session.get_project_details(project_id)
print(f"Project Name: {project_details['name']}")
print(f"Project Description: {project_details['description']}")
Next Steps#
Now that you have created a session and a project, you can start exploring more advanced features of matrice. Check out the API Reference and Tutorials for more information on how to use the package effectively.