sigfox-manager


Namesigfox-manager JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/Jobenas/sigfox_manager_utility
SummaryA Python library for handling Sigfox API operations
upload_time2025-09-12 21:08:36
maintainerNone
docs_urlNone
authorJorge Benavides Aspiazu
requires_python>=3.8
licenseMIT License Copyright (c) 2025 Your Name 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.
keywords sigfox api iot device management
VCS
bugtrack_url
requirements requests pydantic
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sigfox Manager

A Python library for handling Sigfox API operations with ease.

## Features

Currently supports the following operations:
- Get all contracts on current Token
- Get all devices on selected contract  
- Get device information
- Get messages from device
- Create device

## Installation

### From PyPI (when published)
```bash
pip install sigfox-manager
```

### From Source
```bash
git clone https://github.com/Jobenas/sigfox_manager_utility.git
cd sigfox_manager_utility
pip install .
```

### For Development
```bash
git clone https://github.com/Jobenas/sigfox_manager_utility.git
cd sigfox_manager_utility
pip install -e .[dev]
```

## Quick Start

```python
from sigfox_manager import SigfoxManager

# Initialize the manager with your Sigfox API credentials
manager = SigfoxManager(user="your_username", pwd="your_password")

# Get all contracts
contracts = manager.get_contracts()
print(f"Found {len(contracts.data)} contracts")

# Get devices for a contract
if contracts.data:
    contract_id = contracts.data[0].id
    devices = manager.get_devices(contract_id)
    print(f"Found {len(devices.data)} devices")

# Get device information
if devices.data:
    device_id = devices.data[0].id
    device_info = manager.get_device(device_id)
    print(f"Device: {device_info.name}")
    
    # Get device messages
    messages = manager.get_device_messages(device_id)
    print(f"Found {len(messages.data)} messages")
```

## API Reference

### SigfoxManager

The main class for interacting with the Sigfox API.

#### Constructor
```python
SigfoxManager(user: str, pwd: str)
```

#### Methods

- `get_contracts() -> ContractsResponse`: Get all contracts visible to the user
- `get_devices(contract_id: str) -> DevicesResponse`: Get all devices for a contract
- `get_device(device_id: str) -> Device`: Get detailed information about a specific device
- `get_device_messages(device_id: str) -> DeviceMessagesResponse`: Get messages from a device
- `create_device(device_data: BaseDevice) -> Device`: Create a new device

### Exceptions

The library provides custom exceptions for better error handling:

- `SigfoxAPIException`: Base exception for API errors
- `SigfoxDeviceNotFoundError`: Raised when a device is not found
- `SigfoxAuthError`: Raised for authentication errors
- `SigfoxDeviceCreateConflictException`: Raised when trying to create a duplicate device

## Development

### Setting up Development Environment

```bash
# Clone the repository
git clone https://github.com/Jobenas/sigfox_manager_utility.git
cd sigfox_manager_utility

# Install in development mode with dev dependencies
pip install -e .[dev]
```

### Running Tests

```bash
pytest tests/
```

### Code Formatting

```bash
black sigfox_manager/
```

### Type Checking

```bash
mypy sigfox_manager/
```

### Building the Package

```bash
python -m build
```

## License

MIT License - see LICENSE file for details.

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for your changes
5. Run the test suite
6. Submit a pull request

## Support

For issues and questions, please use the [GitHub Issues](https://github.com/Jobenas/sigfox_manager_utility/issues) page.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Jobenas/sigfox_manager_utility",
    "name": "sigfox-manager",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "sigfox, api, iot, device, management",
    "author": "Jorge Benavides Aspiazu",
    "author_email": "Jorge Benavides Aspiazu <jobenas@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3e/45/fd81d90a7fd2c4de2c1d25c03268b8b4858d046c5363e4f526f105dd352e/sigfox_manager-0.2.0.tar.gz",
    "platform": null,
    "description": "# Sigfox Manager\r\n\r\nA Python library for handling Sigfox API operations with ease.\r\n\r\n## Features\r\n\r\nCurrently supports the following operations:\r\n- Get all contracts on current Token\r\n- Get all devices on selected contract  \r\n- Get device information\r\n- Get messages from device\r\n- Create device\r\n\r\n## Installation\r\n\r\n### From PyPI (when published)\r\n```bash\r\npip install sigfox-manager\r\n```\r\n\r\n### From Source\r\n```bash\r\ngit clone https://github.com/Jobenas/sigfox_manager_utility.git\r\ncd sigfox_manager_utility\r\npip install .\r\n```\r\n\r\n### For Development\r\n```bash\r\ngit clone https://github.com/Jobenas/sigfox_manager_utility.git\r\ncd sigfox_manager_utility\r\npip install -e .[dev]\r\n```\r\n\r\n## Quick Start\r\n\r\n```python\r\nfrom sigfox_manager import SigfoxManager\r\n\r\n# Initialize the manager with your Sigfox API credentials\r\nmanager = SigfoxManager(user=\"your_username\", pwd=\"your_password\")\r\n\r\n# Get all contracts\r\ncontracts = manager.get_contracts()\r\nprint(f\"Found {len(contracts.data)} contracts\")\r\n\r\n# Get devices for a contract\r\nif contracts.data:\r\n    contract_id = contracts.data[0].id\r\n    devices = manager.get_devices(contract_id)\r\n    print(f\"Found {len(devices.data)} devices\")\r\n\r\n# Get device information\r\nif devices.data:\r\n    device_id = devices.data[0].id\r\n    device_info = manager.get_device(device_id)\r\n    print(f\"Device: {device_info.name}\")\r\n    \r\n    # Get device messages\r\n    messages = manager.get_device_messages(device_id)\r\n    print(f\"Found {len(messages.data)} messages\")\r\n```\r\n\r\n## API Reference\r\n\r\n### SigfoxManager\r\n\r\nThe main class for interacting with the Sigfox API.\r\n\r\n#### Constructor\r\n```python\r\nSigfoxManager(user: str, pwd: str)\r\n```\r\n\r\n#### Methods\r\n\r\n- `get_contracts() -> ContractsResponse`: Get all contracts visible to the user\r\n- `get_devices(contract_id: str) -> DevicesResponse`: Get all devices for a contract\r\n- `get_device(device_id: str) -> Device`: Get detailed information about a specific device\r\n- `get_device_messages(device_id: str) -> DeviceMessagesResponse`: Get messages from a device\r\n- `create_device(device_data: BaseDevice) -> Device`: Create a new device\r\n\r\n### Exceptions\r\n\r\nThe library provides custom exceptions for better error handling:\r\n\r\n- `SigfoxAPIException`: Base exception for API errors\r\n- `SigfoxDeviceNotFoundError`: Raised when a device is not found\r\n- `SigfoxAuthError`: Raised for authentication errors\r\n- `SigfoxDeviceCreateConflictException`: Raised when trying to create a duplicate device\r\n\r\n## Development\r\n\r\n### Setting up Development Environment\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/Jobenas/sigfox_manager_utility.git\r\ncd sigfox_manager_utility\r\n\r\n# Install in development mode with dev dependencies\r\npip install -e .[dev]\r\n```\r\n\r\n### Running Tests\r\n\r\n```bash\r\npytest tests/\r\n```\r\n\r\n### Code Formatting\r\n\r\n```bash\r\nblack sigfox_manager/\r\n```\r\n\r\n### Type Checking\r\n\r\n```bash\r\nmypy sigfox_manager/\r\n```\r\n\r\n### Building the Package\r\n\r\n```bash\r\npython -m build\r\n```\r\n\r\n## License\r\n\r\nMIT License - see LICENSE file for details.\r\n\r\n## Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch\r\n3. Make your changes\r\n4. Add tests for your changes\r\n5. Run the test suite\r\n6. Submit a pull request\r\n\r\n## Support\r\n\r\nFor issues and questions, please use the [GitHub Issues](https://github.com/Jobenas/sigfox_manager_utility/issues) page.\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT License\r\n        \r\n        Copyright (c) 2025 Your Name\r\n        \r\n        Permission is hereby granted, free of charge, to any person obtaining a copy\r\n        of this software and associated documentation files (the \"Software\"), to deal\r\n        in the Software without restriction, including without limitation the rights\r\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n        copies of the Software, and to permit persons to whom the Software is\r\n        furnished to do so, subject to the following conditions:\r\n        \r\n        The above copyright notice and this permission notice shall be included in all\r\n        copies or substantial portions of the Software.\r\n        \r\n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n        SOFTWARE.",
    "summary": "A Python library for handling Sigfox API operations",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Jobenas/sigfox_manager_utility/issues",
        "Documentation": "https://github.com/Jobenas/sigfox_manager_utility#readme",
        "Homepage": "https://github.com/Jobenas/sigfox_manager_utility",
        "Repository": "https://github.com/Jobenas/sigfox_manager_utility"
    },
    "split_keywords": [
        "sigfox",
        " api",
        " iot",
        " device",
        " management"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "85eabe3a613389af9feda6db4583294f374471a621f63cd431fdc16214fb57e4",
                "md5": "0c650e2f0199e09300e201bd95cdbb6f",
                "sha256": "f2f8530acd748c1c4dc34135d7ce188f364846a8a5d612bc72b1ccde52619fe4"
            },
            "downloads": -1,
            "filename": "sigfox_manager-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c650e2f0199e09300e201bd95cdbb6f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10075,
            "upload_time": "2025-09-12T21:08:34",
            "upload_time_iso_8601": "2025-09-12T21:08:34.026615Z",
            "url": "https://files.pythonhosted.org/packages/85/ea/be3a613389af9feda6db4583294f374471a621f63cd431fdc16214fb57e4/sigfox_manager-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3e45fd81d90a7fd2c4de2c1d25c03268b8b4858d046c5363e4f526f105dd352e",
                "md5": "5f25bde64ce6f20d776a6c3f17b4edce",
                "sha256": "77071f566308fe14cc9d1fee19f55f64b9f57f5c24d7aa5c3ec344e0cedf52a0"
            },
            "downloads": -1,
            "filename": "sigfox_manager-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5f25bde64ce6f20d776a6c3f17b4edce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 78973,
            "upload_time": "2025-09-12T21:08:36",
            "upload_time_iso_8601": "2025-09-12T21:08:36.790175Z",
            "url": "https://files.pythonhosted.org/packages/3e/45/fd81d90a7fd2c4de2c1d25c03268b8b4858d046c5363e4f526f105dd352e/sigfox_manager-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-12 21:08:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Jobenas",
    "github_project": "sigfox_manager_utility",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.25.0"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "1.8.0"
                ]
            ]
        }
    ],
    "lcname": "sigfox-manager"
}
        
Elapsed time: 3.92310s