Metadata-Version: 2.4
Name: emailoctopus-sdk
Version: 0.2.0
Summary: A Python SDK for the Email Octopus V2 API.
Author-email: Luke Day <dayluke01@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Luke Day
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/dayluke/emailoctopus-python
Project-URL: Bug Tracker, https://github.com/dayluke/emailoctopus-python/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: requests-mock; extra == "dev"
Requires-Dist: black; extra == "dev"
Dynamic: license-file

# Email Octopus Python SDK
A friendly, modern Python wrapper for the [Email Octopus API v2](https://emailoctopus.com/api-documentation/v2).

## Features
- Full support for all Email Octopus API v2 endpoints.
- Intuitive methods and object-oriented design.
- Built-in handling for authentication and API errors.
- Type-hinted for a better development experience.

## Installation
You can install the library via pip:
```
pip install emailoctopus-python-sdk
```

## Usage
First, get your API key from your Email Octopus account.
```
from emailoctopus_sdk import Client
import os

# It's recommended to load your API key from an environment variable
api_key = os.environ.get("EMAILOCTOPUS_API_KEY")

if not api_key:
    raise ValueError("EMAILOCTOPUS_API_KEY environment variable not set.")

client = Client(api_key=api_key)

try:
    # Example: Get all mailing lists
    lists = client.get_all_lists()
    for lst in lists:
        print(f"List ID: {lst['id']}, Name: {lst['name']}, Subscribers: {lst['counts']['subscribed']}")

    # Example: Get a specific list
    a_specific_list_id = "YOUR_LIST_ID_HERE"
    list_details = client.get_list(a_specific_list_id)
    print(f"\nDetails for list {list_details['name']}:")
    print(list_details)

except Exception as e:
    print(f"An error occurred: {e}")
```

## Development
To set up the development environment:
1. Clone the repository: ```git clone https://github.com/dayluke/emailoctopus-python.git```
2. Create and activate a virtual environment.
3. Install dependencies: ```pip install -e .[dev]```
4. Run tests: ```pytest```

## Contributing
Contributions are welcome! Please read the [CONTRIBUTING](CONTRIBUTING.md) file for details on how to get started.

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
