VNDB api client implementation and dumps helper
Project description
VNDB Thigh-highs
This module provides 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 TraitDatabaseBuilder
builder = TraitDatabaseBuilder()
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 editing 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for vndb_thigh_highs-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c1fd39dbbedf6086f64a3c40c0fc4cc9b4a03795eec66374a3145f7bf0a4ddd |
|
MD5 | 6c4da61a2a87a1d2548dc000d27eb8af |
|
BLAKE2b-256 | a90b0fb40e50c6830990dcd325700e85e598b6570290fa450590fe24ccaa623f |