django-pbn-client
Reusable Django models and persistence services for data downloaded from the Polish Bibliography Network (PBN).
The package deliberately does not define concrete application models or
migrations. Applications subclass BasePBNMongoDBModel and retain ownership
of their database schema:
from django.db import models
from django_pbn_client import BasePBNMongoDBModel
class Publication(BasePBNMongoDBModel):
title = models.TextField(blank=True, default="")
pull_up_on_save = ["title"]
Downloaded objects can then be stored atomically:
from django_pbn_client import download_pbn_objects, upsert_pbn_object
publication = upsert_pbn_object(payload, Publication)
download_pbn_objects(client.get_publications(), Publication)
django-pbn-client depends only on Django and the transport-level
pbn-client package. Progress bars, background jobs, concrete relationships,
and application-specific integration remain the responsibility of the host
application.
Concurrent page downloads use threads by default. The optional
method="processes" mode uses the POSIX fork start method and is therefore
not available on Windows.
Installation
pip install django-pbn-client
Development
This package depends on the transport-level
pbn-client package. Until pbn-client
is published to PyPI, a dev-only [tool.uv.sources] entry in pyproject.toml
resolves it from a sibling checkout, so clone both repositories side by side:
git clone https://github.com/iplweb/pbn-client.git
git clone https://github.com/iplweb/django-pbn-client.git
cd django-pbn-client
The source override is ignored when building or publishing wheels, so end users
still get pbn-client from PyPI via the version constraint in
[project.dependencies].
Run the standalone package tests with:
uv run --group dev pytest
License
Released under the MIT License.
Release files for django-pbn-client 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_pbn_client-0.2.3.tar.gz | 15.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_pbn_client-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.7 kB
Release files / django_pbn_client-0.2.3.tar.gz
| Download URL | django_pbn_client-0.2.3.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a77ec871e8e069a4a5b7436c90e533835b3e58a566e76f82f347da6237cdd4a9
|
|
BLAKE2b-256 checksum How to use checksums |
adef5cf6c80b523e3ad98dc7d110b8d556db61c55f31a292faee749f398dbcb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_pbn_client-0.2.3-py3-none-any.whl
| Download URL | django_pbn_client-0.2.3-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98d2a6310792fb9ee09d99e515fe28e889f486bd416e8273a26ccaa7bc84f419
|
|
BLAKE2b-256 checksum How to use checksums |
a3cf245e7257184e80ccbe97bb3b7f19800dac83e4b3a229b28c6d2067b029ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|