Getting Started

Installation

Install the MyoSapiens Python SDK and set up your development environment.

Requirements

Before you begin, make sure you have:

  • Python 3.10 or higher - Check your version with python --version
  • An API key - Get one from dev.myolab.ai (see Account Setup for instructions)

Install the SDK

Install the myosdk package using pip:

Terminal
pip install myosdk

For production applications, consider using a virtual environment:

Terminal
# Create virtual environment
python -m venv venv

# Activate it (macOS/Linux)
source venv/bin/activate

# Activate it (Windows)
venv\Scripts\activate

# Install SDK
pip install myosdk

Set Up Your API Key

For security, store your API key as an environment variable rather than hardcoding it:

macOS/Linux:

Terminal
export MYOSDK_API_KEY="your_api_key_here"

Windows (PowerShell):

PowerShell
$env:MYOSDK_API_KEY="your_api_key_here"

Windows (Command Prompt):

Command Prompt
set MYOSDK_API_KEY=your_api_key_here

To make it persistent, add it to your shell profile (.bashrc, .zshrc, etc.) or use a .env file with a library like python-dotenv.

Initialize the Client

Once installed, you can initialize the client:

Python
import os
from myosdk import Client

# Initialize with API key from environment variable
client = Client(api_key=os.getenv("MYOSDK_API_KEY"))

print("Client initialized successfully!")

You can also pass the API key directly (not recommended for production):

Python
from myosdk import Client

client = Client(api_key="your_api_key_here")

Verify Installation

Test that everything is working:

Python
import os
from myosdk import Client

client = Client(api_key=os.getenv("MYOSDK_API_KEY"))

# Clean up
client.close()

If you see character data, your installation is working correctly!

Security Best Practice: Never commit your API key to version control. Always use environment variables or a secure secrets management system. See Error Handling for production-ready patterns.

Next Steps