Skip to main content

libsocial-core

The site-independent core shared by the async Python SDKs for the lib.social sites (ranobelib.me, mangalib.me, ...). They all sit on one backend, api.cdnlibs.org, and differ mainly in the Site-Id they send and in what a chapter contains.

This package is the shared part:

  • ApiClient: the api.cdnlibs.org client, scoped to a site by a Site (id + origin). Bounded concurrency, retries with backoff on 429/5xx, and request pacing shared by every client in the process that talks to the same host.
  • TitleClient: one title's metadata, table of contents, translations (branches), chapter fetching and whole-title download, with a disk cache.
  • Catalog: catalog listing/search and the genre/country/status lists, filtered to the site.
  • Models (Title, Chapter, ChapterBranch, Volume, ...) and exceptions.

It's meant to be used through a site package, which sets the site and its chapter model — most likely ranobelib-python-sdk, not directly.

from libsocial import Site, TitleClient
from libsocial.models import Chapter, Title, Volume


class MyChapter(Chapter):
    content: str | None = None


class MyVolume(Volume[MyChapter]):
    pass


class MySite(TitleClient[Title, MyChapter, MyVolume]):
    site = Site(id=3, origin="https://ranobelib.me")
    title_model = Title
    chapter_model = MyChapter
    volume_model = MyVolume


async with MySite("https://ranobelib.me/ru/book/6712--high-school-dxd-novel") as client:
    info = await client.get_info()

Repository, documentation and the site packages: https://github.com/LLIJIYAPNIK/libsocial-sdk.

MIT licensed.

Metadata

Release files for libsocial-core 1.0.1

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

Source distribution (sdist)

Source distribution for libsocial-core 1.0.1
File Size Uploaded
libsocial_core-1.0.1.tar.gz 29.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for libsocial-core 1.0.1
File Interpreter ABI Platform
libsocial_core-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 65.0 kB

Release files / libsocial_core-1.0.1.tar.gz

Download URL libsocial_core-1.0.1.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2987e2d823a4551bb76fb4fa0178c59e8713b7db5a1ff1025af4e5527dd25c95
BLAKE2b-256 checksum
How to use checksums
78813ba2f2fc11a2f3e8375122263fde8cdb0b2d028081f24289cfad48879776
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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 / libsocial_core-1.0.1-py3-none-any.whl

Download URL libsocial_core-1.0.1-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e78581d754ad4627657705ab6ec40caa2ff585e1f5a81407181f6abb6ed34dbb
BLAKE2b-256 checksum
How to use checksums
8bffc8b25f9adc44ff49352ca19d1633d6b18148b924f12a8012413ed953d279
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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 history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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