Skip to main content

chgk_rating_client

Клиент для API сайта рейтинга спортивного ЧГК с кэшем в Redis или локальных файлах.

Сохраняет почти все неточности и странности API (например, числа остаются строками).

Установка:

pip3 install chgk_rating_client

Использование:

from chgk_rating_client import Rating

client = Rating()

Использование с кэшированием в редисе:

client = Rating(redis_host='localhost')

Использование с кэшированием в локальных файлах:

client = Rating(file_cache=True)

Можно включить и оба одновременно, это же ваши диск и редис.

Теперь можно делать запросы:

rosters = client.tournament_rosters(5773)
player = client.player(40393)

Умной очистки кэша пока нет, поэтому можно удалить либо все записи:

client.clear_cache()

Либо по маске:

client.clear_cache("*rosters*")
client.clear_cache("*40393")

Metadata

Release files for chgk-rating-client 1.0.2

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

Source distribution (sdist)

Source distribution for chgk-rating-client 1.0.2
File Size Uploaded Provenance Actions
chgk_rating_client-1.0.2.tar.gz 3.8 kB Without provenance Details for chgk_rating_client-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chgk-rating-client 1.0.2
File Interpreter ABI Platform Actions
chgk_rating_client-1.0.2-py3-none-any.whl Python 3 none any Details for chgk_rating_client-1.0.2-py3-none-any.whl

Total release size: 8.6 kB

Release files / chgk_rating_client-1.0.2.tar.gz

Download URL chgk_rating_client-1.0.2.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9aaa8a7757f4d1e8dcf2bfe2f2691f504144aa244406f1028740b819c171903a
BLAKE2b-256 checksum
How to use checksums
623db7b2eac1ba46473f4f003f24de8dbf3ccf3578190f95d634724494830e91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

Release files / chgk_rating_client-1.0.2-py3-none-any.whl

Download URL chgk_rating_client-1.0.2-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e09871c95861294d9eabbfe58d8dbda339b1aca7f12b3f4515455d543011ec91
BLAKE2b-256 checksum
How to use checksums
0c1afe8931325377f5fe6d5058ec59a9d3cce30c97ff6faa8a3dd86adf89dbe6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

Security for chgk-rating-client 1.0.2

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.

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