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/ranobelib-python-sdk.

MIT licensed.

Metadata

Release files for libsocial-core 1.0.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 libsocial-core 1.0.0
File Size Uploaded
libsocial_core-1.0.0.tar.gz 29.4 kB Details

Built distribution (wheel)

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

Total release size: 64.9 kB

Release files / libsocial_core-1.0.0.tar.gz

Download URL libsocial_core-1.0.0.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8f8e8191048b163fc6c4a925d98680ceb89e9079b9f635dcfbd3d70e718eab23
BLAKE2b-256 checksum
How to use checksums
db7865806df7f2ac9610f24191fae9987e6ae65c7a2d88a510efd6a65680554e
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.0-py3-none-any.whl

Download URL libsocial_core-1.0.0-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
866b31f77390be1d3f077e269e9ee03805e37b58b2d5ebcd024ddc79526cf666
BLAKE2b-256 checksum
How to use checksums
fee784b5565159c6699bd15fb95a238b71e80d3aec5047b011095a5b26f16d92
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

1.0.1

2 release files

This release

1.0.0 This release

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