spoolman


Namespoolman JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/klaasnicolaas/python-spoolman
SummaryAsynchronous Python client for Spoolman API
upload_time2024-12-30 03:11:05
maintainerKlaas Schoute
docs_urlNone
authorKlaas Schoute
requires_python<4.0,>=3.11
licenseMIT
keywords spoolman api async client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- Banner -->
![alt Banner of the Spoolman package](https://raw.githubusercontent.com/klaasnicolaas/python-spoolman/main/assets/header_spoolman-min.png)

<!-- PROJECT SHIELDS -->
[![GitHub Release][releases-shield]][releases]
[![Python Versions][python-versions-shield]][pypi]
![Project Stage][project-stage-shield]
![Project Maintenance][maintenance-shield]
[![License][license-shield]](LICENSE)

[![GitHub Activity][commits-shield]][commits-url]
[![PyPi Downloads][downloads-shield]][downloads-url]
[![GitHub Last Commit][last-commit-shield]][commits-url]
[![Open in Dev Containers][devcontainer-shield]][devcontainer]

[![Build Status][build-shield]][build-url]
[![Typing Status][typing-shield]][typing-url]
[![Code Coverage][codecov-shield]][codecov-url]


Asynchronous Python client for [Spoolman][spoolman].

## About

Spoolman is a self-hosted platform for managing 3D printer filament spools. It integrates with popular 3D printing software to track spool weights in real time, providing instant insights into filament usage.

## Installation

```bash
pip install spoolman
```

## Data

- Application info and health
- Filaments
- Spools
- Vendors

### Example

```python
import asyncio

from spoolman import Spoolman


async def main() -> None:
    """Show example on using this package."""
    async with Spoolman(host="IP_ADDRESS") as client:
        # Get all filaments
        filaments = await client.get_filaments()
        print(filaments)


if __name__ == "__main__":
    asyncio.run(main())
```

More examples can be found in the [examples folder](./examples/).

## Class Parameters

| Parameter | value Type | Description                                                       |
| :-------- | :--------- | :---------------------------------------------------------------- |
| `host`    | `str`      | The IP address of your Spoolman instance.                         |
| `port`    | `int`      | The port of your Spoolman instance (optional). Default is `7912`. |

## Contributing

This is an active open-source project. We are always open to people who want to
use the code or contribute to it.

We've set up a separate document for our
[contribution guidelines](CONTRIBUTING.md).

Thank you for being involved! :heart_eyes:

## Setting up development environment

The simplest way to begin is by utilizing the [Dev Container][devcontainer]
feature of Visual Studio Code or by opening a CodeSpace directly on GitHub.
By clicking the button below you immediately start a Dev Container in Visual Studio Code.

[![Open in Dev Containers][devcontainer-shield]][devcontainer]

This Python project relies on [Poetry][poetry] as its dependency manager,
providing comprehensive management and control over project dependencies.

You need at least:

- Python 3.11+
- [Poetry][poetry-install]

### Installation

Install all packages, including all development requirements:

```bash
poetry install
```

_Poetry creates by default an virtual environment where it installs all
necessary pip packages_.

### Pre-commit

This repository uses the [pre-commit][pre-commit] framework, all changes
are linted and tested with each commit. To setup the pre-commit check, run:

```bash
poetry run pre-commit install
```

And to run all checks and tests manually, use the following command:

```bash
poetry run pre-commit run --all-files
```

### Testing

It uses [pytest](https://docs.pytest.org/en/stable/) as the test framework. To run the tests:

```bash
poetry run pytest
```

To update the [syrupy](https://github.com/tophat/syrupy) snapshot tests:

```bash
poetry run pytest --snapshot-update
```

## License

MIT License

Copyright (c) 2024 Klaas Schoute

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.


<!-- LINKS FROM PLATFORM -->
[spoolman]: https://github.com/Donkie/Spoolman

<!-- MARKDOWN LINKS & IMAGES -->
[build-shield]: https://github.com/klaasnicolaas/python-spoolman/actions/workflows/tests.yaml/badge.svg
[build-url]: https://github.com/klaasnicolaas/python-spoolman/actions/workflows/tests.yaml
[codecov-shield]: https://codecov.io/gh/klaasnicolaas/python-spoolman/branch/main/graph/badge.svg?token=C92VQ5QJ21
[codecov-url]: https://codecov.io/gh/klaasnicolaas/python-spoolman
[commits-shield]: https://img.shields.io/github/commit-activity/y/klaasnicolaas/python-spoolman.svg
[commits-url]: https://github.com/klaasnicolaas/python-spoolman/commits/main
[devcontainer-shield]: https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode
[devcontainer]: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/klaasnicolaas/python-spoolman
[downloads-shield]: https://img.shields.io/pypi/dm/spoolman
[downloads-url]: https://pypistats.org/packages/spoolman
[last-commit-shield]: https://img.shields.io/github/last-commit/klaasnicolaas/python-spoolman.svg
[license-shield]: https://img.shields.io/github/license/klaasnicolaas/python-spoolman.svg
[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg
[pypi]: https://pypi.org/project/spoolman/
[python-versions-shield]: https://img.shields.io/pypi/pyversions/spoolman
[releases-shield]: https://img.shields.io/github/release/klaasnicolaas/python-spoolman.svg
[releases]: https://github.com/klaasnicolaas/python-spoolman/releases
[typing-shield]: https://github.com/klaasnicolaas/python-spoolman/actions/workflows/typing.yaml/badge.svg
[typing-url]: https://github.com/klaasnicolaas/python-spoolman/actions/workflows/typing.yaml

[poetry-install]: https://python-poetry.org/docs/#installation
[poetry]: https://python-poetry.org
[pre-commit]: https://pre-commit.com


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/klaasnicolaas/python-spoolman",
    "name": "spoolman",
    "maintainer": "Klaas Schoute",
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": "hello@student-techlife.com",
    "keywords": "spoolman, api, async, client",
    "author": "Klaas Schoute",
    "author_email": "hello@student-techlife.com",
    "download_url": "https://files.pythonhosted.org/packages/09/4f/76e25b30f12cd215a4541b787142f031d685e9bfaa94e925b37291e50298/spoolman-0.1.0.tar.gz",
    "platform": null,
    "description": "<!-- Banner -->\n![alt Banner of the Spoolman package](https://raw.githubusercontent.com/klaasnicolaas/python-spoolman/main/assets/header_spoolman-min.png)\n\n<!-- PROJECT SHIELDS -->\n[![GitHub Release][releases-shield]][releases]\n[![Python Versions][python-versions-shield]][pypi]\n![Project Stage][project-stage-shield]\n![Project Maintenance][maintenance-shield]\n[![License][license-shield]](LICENSE)\n\n[![GitHub Activity][commits-shield]][commits-url]\n[![PyPi Downloads][downloads-shield]][downloads-url]\n[![GitHub Last Commit][last-commit-shield]][commits-url]\n[![Open in Dev Containers][devcontainer-shield]][devcontainer]\n\n[![Build Status][build-shield]][build-url]\n[![Typing Status][typing-shield]][typing-url]\n[![Code Coverage][codecov-shield]][codecov-url]\n\n\nAsynchronous Python client for [Spoolman][spoolman].\n\n## About\n\nSpoolman is a self-hosted platform for managing 3D printer filament spools. It integrates with popular 3D printing software to track spool weights in real time, providing instant insights into filament usage.\n\n## Installation\n\n```bash\npip install spoolman\n```\n\n## Data\n\n- Application info and health\n- Filaments\n- Spools\n- Vendors\n\n### Example\n\n```python\nimport asyncio\n\nfrom spoolman import Spoolman\n\n\nasync def main() -> None:\n    \"\"\"Show example on using this package.\"\"\"\n    async with Spoolman(host=\"IP_ADDRESS\") as client:\n        # Get all filaments\n        filaments = await client.get_filaments()\n        print(filaments)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nMore examples can be found in the [examples folder](./examples/).\n\n## Class Parameters\n\n| Parameter | value Type | Description                                                       |\n| :-------- | :--------- | :---------------------------------------------------------------- |\n| `host`    | `str`      | The IP address of your Spoolman instance.                         |\n| `port`    | `int`      | The port of your Spoolman instance (optional). Default is `7912`. |\n\n## Contributing\n\nThis is an active open-source project. We are always open to people who want to\nuse the code or contribute to it.\n\nWe've set up a separate document for our\n[contribution guidelines](CONTRIBUTING.md).\n\nThank you for being involved! :heart_eyes:\n\n## Setting up development environment\n\nThe simplest way to begin is by utilizing the [Dev Container][devcontainer]\nfeature of Visual Studio Code or by opening a CodeSpace directly on GitHub.\nBy clicking the button below you immediately start a Dev Container in Visual Studio Code.\n\n[![Open in Dev Containers][devcontainer-shield]][devcontainer]\n\nThis Python project relies on [Poetry][poetry] as its dependency manager,\nproviding comprehensive management and control over project dependencies.\n\nYou need at least:\n\n- Python 3.11+\n- [Poetry][poetry-install]\n\n### Installation\n\nInstall all packages, including all development requirements:\n\n```bash\npoetry install\n```\n\n_Poetry creates by default an virtual environment where it installs all\nnecessary pip packages_.\n\n### Pre-commit\n\nThis repository uses the [pre-commit][pre-commit] framework, all changes\nare linted and tested with each commit. To setup the pre-commit check, run:\n\n```bash\npoetry run pre-commit install\n```\n\nAnd to run all checks and tests manually, use the following command:\n\n```bash\npoetry run pre-commit run --all-files\n```\n\n### Testing\n\nIt uses [pytest](https://docs.pytest.org/en/stable/) as the test framework. To run the tests:\n\n```bash\npoetry run pytest\n```\n\nTo update the [syrupy](https://github.com/tophat/syrupy) snapshot tests:\n\n```bash\npoetry run pytest --snapshot-update\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2024 Klaas Schoute\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n<!-- LINKS FROM PLATFORM -->\n[spoolman]: https://github.com/Donkie/Spoolman\n\n<!-- MARKDOWN LINKS & IMAGES -->\n[build-shield]: https://github.com/klaasnicolaas/python-spoolman/actions/workflows/tests.yaml/badge.svg\n[build-url]: https://github.com/klaasnicolaas/python-spoolman/actions/workflows/tests.yaml\n[codecov-shield]: https://codecov.io/gh/klaasnicolaas/python-spoolman/branch/main/graph/badge.svg?token=C92VQ5QJ21\n[codecov-url]: https://codecov.io/gh/klaasnicolaas/python-spoolman\n[commits-shield]: https://img.shields.io/github/commit-activity/y/klaasnicolaas/python-spoolman.svg\n[commits-url]: https://github.com/klaasnicolaas/python-spoolman/commits/main\n[devcontainer-shield]: https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode\n[devcontainer]: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/klaasnicolaas/python-spoolman\n[downloads-shield]: https://img.shields.io/pypi/dm/spoolman\n[downloads-url]: https://pypistats.org/packages/spoolman\n[last-commit-shield]: https://img.shields.io/github/last-commit/klaasnicolaas/python-spoolman.svg\n[license-shield]: https://img.shields.io/github/license/klaasnicolaas/python-spoolman.svg\n[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg\n[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg\n[pypi]: https://pypi.org/project/spoolman/\n[python-versions-shield]: https://img.shields.io/pypi/pyversions/spoolman\n[releases-shield]: https://img.shields.io/github/release/klaasnicolaas/python-spoolman.svg\n[releases]: https://github.com/klaasnicolaas/python-spoolman/releases\n[typing-shield]: https://github.com/klaasnicolaas/python-spoolman/actions/workflows/typing.yaml/badge.svg\n[typing-url]: https://github.com/klaasnicolaas/python-spoolman/actions/workflows/typing.yaml\n\n[poetry-install]: https://python-poetry.org/docs/#installation\n[poetry]: https://python-poetry.org\n[pre-commit]: https://pre-commit.com\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Asynchronous Python client for Spoolman API",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/klaasnicolaas/python-spoolman/issues",
        "Changelog": "https://github.com/klaasnicolaas/python-spoolman/releases",
        "Documentation": "https://github.com/klaasnicolaas/python-spoolman",
        "Homepage": "https://github.com/klaasnicolaas/python-spoolman",
        "Repository": "https://github.com/klaasnicolaas/python-spoolman"
    },
    "split_keywords": [
        "spoolman",
        " api",
        " async",
        " client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2eadf818b1f57da69fe1e33e2750a1c3d7d7ea600a0a323094dbcfedc9dfb711",
                "md5": "0a0b5a6a59200dc4b7dde5b86c4e6eee",
                "sha256": "844c9e0ea28b07e32fa580982eb4052f3607c5bc2d308af1963d180bb4159983"
            },
            "downloads": -1,
            "filename": "spoolman-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0a0b5a6a59200dc4b7dde5b86c4e6eee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 8080,
            "upload_time": "2024-12-30T03:11:02",
            "upload_time_iso_8601": "2024-12-30T03:11:02.300795Z",
            "url": "https://files.pythonhosted.org/packages/2e/ad/f818b1f57da69fe1e33e2750a1c3d7d7ea600a0a323094dbcfedc9dfb711/spoolman-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "094f76e25b30f12cd215a4541b787142f031d685e9bfaa94e925b37291e50298",
                "md5": "b61e8f7a5545b744d0b70db7dc1c446f",
                "sha256": "ab318a9be524acad334154090a116fb4c8dd51885bd5b8267de6705b5667b539"
            },
            "downloads": -1,
            "filename": "spoolman-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b61e8f7a5545b744d0b70db7dc1c446f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 7386,
            "upload_time": "2024-12-30T03:11:05",
            "upload_time_iso_8601": "2024-12-30T03:11:05.226300Z",
            "url": "https://files.pythonhosted.org/packages/09/4f/76e25b30f12cd215a4541b787142f031d685e9bfaa94e925b37291e50298/spoolman-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-30 03:11:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "klaasnicolaas",
    "github_project": "python-spoolman",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "spoolman"
}
        
Elapsed time: 1.81681s