Skip to main content

Wrappers for the Inventaire API

Project description

Inventaire

PyPI - Python Version PyPI PyPI - License

Project description

The package is a set of python wrappers for Inventaire. Interact with Inventaire using python and create automation scripts to keep your library and database up-to-date.

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

Troubleshooting

For troubleshooting see TROUBLESHOOTING.md

License

This library is licensed under the Apache 2.0 License.

Links

Inventaire docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inventaire_python_api-0.1.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inventaire_python_api-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file inventaire_python_api-0.1.0.tar.gz.

File metadata

  • Download URL: inventaire_python_api-0.1.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for inventaire_python_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a01b88c0ffb96aa0fbfa796a339994f9e9458d965640f38c2148611f6a647f15
MD5 c33b13bbef29c689a4c553ab7885acbd
BLAKE2b-256 25623205770634fae060dff17d468da21d11ae18935d3a1593f7567c8100ed89

See more details on using hashes here.

File details

Details for the file inventaire_python_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for inventaire_python_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e4a8e43ae955f55a44e0df1a73ca3d6e450b8815c15ef1c1881ee398081123b
MD5 f92d5f8a064b56555cc556ae43ae4d65
BLAKE2b-256 3fb7e7014087e7d6bc3600578f5d3c13743247001c017d43368ae852a3f18139

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page