Skip to main content

Stockholm-Library

License Latest PyPI version PyPI status

Unofficial SDK for interacting with Stockholm Library

Currently the project is in very early development and very little functionality can be used. But if you are eager to get stuff going, please consider helping out by contributing!

Usage

Connecting

The simplest way to connect with the client is through credentials.

from stockholm_library import Client

client = Client()
success: bool = client.login(
    user="8705061234",
    pin="1234"
)
print(success)  # True

Fetching loaned books

loans = client.get_loans()

for loan in loans:
    print(loan)  # {id: 123456, book: ...}

Below is the structure of a Loan object:

{
    "id": 123456,
    "book": models.Book(
        "id": 129716,
        "title": "Liftarens guide till galaxen",
        "author": "Douglas Adams"
    ),
    "borrowed_from": "Telefonplans bibliotek",
    "borrowed_date": datetime.date(2022, 3, 5),
    "due_date": datetime.date(2022, 4, 3),
    "can_re_borrow": True
}

Beware that not all loans have an ID at every given moment. If it's not possible to re-borrow a book it won't yield an ID.

Contributing

Contributions are always welcome!

To contribute, please take the following steps:

  1. Fork the repo
  2. Add your change
  3. Make a pull request with a short description of the change you're proposing.

Authors

Metadata

Release files for stockholm-library 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 stockholm-library 0.2.0
File Size Uploaded Provenance Actions
stockholm-library-0.2.0.tar.gz 6.9 kB Without provenance Details for stockholm-library-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stockholm-library 0.2.0
File Interpreter ABI Platform Actions
stockholm_library-0.2.0-py3-none-any.whl Python 3 none any Details for stockholm_library-0.2.0-py3-none-any.whl

Total release size: 13.9 kB

Release files / stockholm-library-0.2.0.tar.gz

Download URL stockholm-library-0.2.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dcd848ea0a683558cfea0fff3d50c2ef4910f1a6a460f1cdb2e9a5de6c8bfb55
BLAKE2b-256 checksum
How to use checksums
8838dd8c3eaf343dc39fbd70f9c3f92e25cf52e60db580129c447f0f5a9c6e70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.9

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

Download URL stockholm_library-0.2.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70abad5898797cf90be4f05b8e5fe83a8f71b13b34d081fc1c93e7602175f204
BLAKE2b-256 checksum
How to use checksums
fa1b45c9cd3136b0ca16a5dc8650f83f54b628c2f6211810103eabdf8c456cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.9

Security for stockholm-library 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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