Skip to main content

Inventaire

PyPI - Python Version PyPI PyPI - License

Project description

This package makes it easy to use Inventaire with Python. You can write simple scripts to manage your library and keep your database up to date automatically.

For more detailed information please see the project's documentation.

To be done:

  • More usage examples
  • Increase the tests coverage
  • Convenient docs
  • Implementing higher level wrappers

Installation

pip install inventaire-python-api

Authentication

Inventaire auth requires either the username or password or a cookie (see the how-to)

from inventaire import Inventaire

auth = {"username": "demo-user", "password": "abcde1-fghij2-klmno3"}
inv = Inventaire.server_api(**auth)

Usage

Then it is possible to interact with the low-level api wrappers:

# Get information about the authenticated user
auth_data = inv.api.user.get_authentified_user()

# Get the last public items modified
last_items = inv.api.items.get_last_public_items()

# Get shelves information based on their ids
shelves_ids = inv.api.shelves.get_shelves_by_ids(
    ["b30491238f4a79a466c27418a2280c12", "0c490f3bc5ea9ab450bc24ff55151814"]
)

# Create a new shelf
new_shelf = inv.api.shelves.create_shelf(
    name="demo", listing="private", description="something"

# Get entity details and if it doesn't exist, try to create it
uri_details = inv.api.entities.get_entities_by_uris(
    uris="isbn:9789735087180",
    autocreate=True,
    refresh=True,
)

Each Inventaire API wrapper group could be accessed as a property:

iapi = inv.api

# Items
items = iapi.items

# Shelves
shelves = iapi.shelves

License

This library is licensed under the Apache 2.0 License.

Inventaire docs

Metadata

Release files for inventaire-python-api 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inventaire-python-api 0.2.0
File Size Uploaded Provenance Actions
inventaire_python_api-0.2.0.tar.gz 17.9 kB Without provenance Details for inventaire_python_api-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inventaire-python-api 0.2.0
File Interpreter ABI Platform Actions
inventaire_python_api-0.2.0-py3-none-any.whl Python 3 none any Details for inventaire_python_api-0.2.0-py3-none-any.whl

Total release size: 43.0 kB

Release files / inventaire_python_api-0.2.0.tar.gz

Download URL inventaire_python_api-0.2.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
10ab9a62512d654c7862c4f8fe9174a939a24c85300ae2c1aa8eee3265186d38
BLAKE2b-256 checksum
How to use checksums
a696e0b4df312673a02fa402f37f895386b9f6b53ba138fadcf9fe719f6ae486
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Release files / inventaire_python_api-0.2.0-py3-none-any.whl

Download URL inventaire_python_api-0.2.0-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe58a594b1436623986609ec7d9ca6aee39a0d2716227553023a717e343f6cdf
BLAKE2b-256 checksum
How to use checksums
f4113d6ff041397fe4a1409d538f1d1ac6be9e587ecba4a2cecef4b78b767a63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Security for inventaire-python-api 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page