Skip to main content

VNDB api client implementation and dumps helper

Project description

VNDB Thigh-highs

This module provide a VNDB client api implementation. It aims to provide some high level features to easily use VNDB api. It also includes some helper functions and classes to easily use database dumps.

API Quick start

from vndb_thigh_highs import VNDB
from vndb_thigh_highs.models import VN

vndb = VNDB()
vns = vndb.get_vn(VN.id == 17)
vn = vns[0]
print(vn.title)

Check the documentation for more details

Dumps Quick start

from vndb_thigh_highs.dumps import TraitsDatabaseBuilder

builder = TraitsDatabaseBuilder()
trait_db = builder.build_with_archive("path/to/traits.json.gz")
trait_id = 186
trait = trait_db.get_trait(trait_id)
print(trait.name)

Check the documentation for more details

Testing

Run test/main.py.

By default tests are run using predefined responses. It is possible to run them with vndb by edting use_mock_socket = True in test/test_case.py, though logged in tests require valid credentials in data/login.json. A few troublesome tests are also skipped when using vndb.

Database dumps tests will need dumps, compressed and decompressed, in data/.

License

This module is licensed under the AGPLv3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vndb-thigh-highs-0.1.5.tar.gz (28.6 kB view hashes)

Uploaded source

Built Distribution

vndb_thigh_highs-0.1.5-py3-none-any.whl (36.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page