| Name | switchport JSON | 
            
| Version | 
                  0.2.0
                   
                  JSON | 
            
 | download  | 
            
| home_page | None  | 
            
| Summary | Python SDK for Switchport - Prompt management and A/B testing platform | 
            | upload_time | 2025-11-02 20:17:15 | 
            | maintainer | None | 
            
            | docs_url | None | 
            | author | None | 
            
            | requires_python | >=3.8 | 
            
            
            | license | MIT | 
            | keywords | 
                
                    a/b testing
                
                     ai
                
                     llm
                
                     prompt
                
                     sdk
                
                     switchport
                 | 
            | VCS | 
                
                     | 
                
            
            | bugtrack_url | 
                
                 | 
             
            
            | requirements | 
                
                  No requirements were recorded.
                
             | 
            
| Travis-CI | 
                
                   No Travis.
                
             | 
            | coveralls test coverage | 
                
                   No coveralls.
                
             | 
        
        
            
            # Switchport Python SDK
Official Python SDK for [Switchport](https://switchport.ai) - Prompt management and A/B testing platform.
## Features
- 🚀 **Easy Integration**: Simple, intuitive API
- 🎯 **Prompt Execution**: Call LLMs with managed prompts
- 📊 **A/B Testing**: Deterministic version routing based on context
- 📈 **Metrics Recording**: Track performance and user feedback
- 🔐 **Secure**: API key authentication
- 🎨 **Flexible Context**: Support for dict or string context
## Installation
```bash
pip install switchport
```
Or install from source:
```bash
git clone https://github.com/switchport-ai/switchport-python.git
cd switchport-python
pip install -e .
```
## Quick Start
### 1. Get Your API Key
1. Sign up at [switchport.ai](https://switchport.ai)
2. Create an organization and project
3. Get your API key from Settings (starts with `sp_`)
### 2. Set Environment Variable
```bash
export SWITCHPORT_API_KEY=sp_your_key_here
```
### 3. Use the SDK
```python
from switchport import Switchport
# Initialize client
client = Switchport()  # Reads API key from environment
# Execute a prompt
response = client.prompts.execute(
    prompt_key="welcome-message",
    variables={"customer_name": "Alice"}
)
print(response.text)  # Generated text from LLM
```
For complete examples and documentation, see the [examples](examples/) directory.
            
         
        Raw data
        
            {
    "_id": null,
    "home_page": null,
    "name": "switchport",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "a/b testing, ai, llm, prompt, sdk, switchport",
    "author": null,
    "author_email": "Switchport <hello@switchport.ai>",
    "download_url": "https://files.pythonhosted.org/packages/f8/f5/546f61f2f2fb544fe37e5973122c27c80c0f4f4116bdb90ffdd417a8080c/switchport-0.2.0.tar.gz",
    "platform": null,
    "description": "# Switchport Python SDK\n\nOfficial Python SDK for [Switchport](https://switchport.ai) - Prompt management and A/B testing platform.\n\n## Features\n\n- \ud83d\ude80 **Easy Integration**: Simple, intuitive API\n- \ud83c\udfaf **Prompt Execution**: Call LLMs with managed prompts\n- \ud83d\udcca **A/B Testing**: Deterministic version routing based on context\n- \ud83d\udcc8 **Metrics Recording**: Track performance and user feedback\n- \ud83d\udd10 **Secure**: API key authentication\n- \ud83c\udfa8 **Flexible Context**: Support for dict or string context\n\n## Installation\n\n```bash\npip install switchport\n```\n\nOr install from source:\n\n```bash\ngit clone https://github.com/switchport-ai/switchport-python.git\ncd switchport-python\npip install -e .\n```\n\n## Quick Start\n\n### 1. Get Your API Key\n\n1. Sign up at [switchport.ai](https://switchport.ai)\n2. Create an organization and project\n3. Get your API key from Settings (starts with `sp_`)\n\n### 2. Set Environment Variable\n\n```bash\nexport SWITCHPORT_API_KEY=sp_your_key_here\n```\n\n### 3. Use the SDK\n\n```python\nfrom switchport import Switchport\n\n# Initialize client\nclient = Switchport()  # Reads API key from environment\n\n# Execute a prompt\nresponse = client.prompts.execute(\n    prompt_key=\"welcome-message\",\n    variables={\"customer_name\": \"Alice\"}\n)\n\nprint(response.text)  # Generated text from LLM\n```\n\nFor complete examples and documentation, see the [examples](examples/) directory.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python SDK for Switchport - Prompt management and A/B testing platform",
    "version": "0.2.0",
    "project_urls": {
        "Documentation": "https://docs.switchport.ai/sdk/python/quickstart",
        "Homepage": "https://switchport.ai",
        "Issues": "https://github.com/switchport-ai/switchport-python/issues",
        "Repository": "https://github.com/switchport-ai/switchport-python"
    },
    "split_keywords": [
        "a/b testing",
        " ai",
        " llm",
        " prompt",
        " sdk",
        " switchport"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "907f2df66114fae60e596b1959692d50543aa37f1a0163c3e682b0862020b4f7",
                "md5": "d359e2cb5c322ceb7b7a7728c14d446c",
                "sha256": "654f61660c1337b8e8d3e96282070a2d4375d7d7a01d7d51201c18eaa8690d81"
            },
            "downloads": -1,
            "filename": "switchport-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d359e2cb5c322ceb7b7a7728c14d446c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7331,
            "upload_time": "2025-11-02T20:17:14",
            "upload_time_iso_8601": "2025-11-02T20:17:14.777693Z",
            "url": "https://files.pythonhosted.org/packages/90/7f/2df66114fae60e596b1959692d50543aa37f1a0163c3e682b0862020b4f7/switchport-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f8f5546f61f2f2fb544fe37e5973122c27c80c0f4f4116bdb90ffdd417a8080c",
                "md5": "34efac6de5d23469ed4ed3c8f861a2c6",
                "sha256": "9ad339dfaece257e3231f66bc56f3e11652bf11cce9dfed2c209c3e3a8c2c1e3"
            },
            "downloads": -1,
            "filename": "switchport-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "34efac6de5d23469ed4ed3c8f861a2c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11282,
            "upload_time": "2025-11-02T20:17:15",
            "upload_time_iso_8601": "2025-11-02T20:17:15.941511Z",
            "url": "https://files.pythonhosted.org/packages/f8/f5/546f61f2f2fb544fe37e5973122c27c80c0f4f4116bdb90ffdd417a8080c/switchport-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-02 20:17:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "switchport-ai",
    "github_project": "switchport-python",
    "github_not_found": true,
    "lcname": "switchport"
}