Skip to main content

Arknights python wrapper.

Project description

ArkPRTS

Arknights python wrapper.

This project aims to purely allow for data collection, no account automation is planned.


Source Code: https://github.com/thesadru/arkprts


Usage

import arkprts

async def main() -> None:
    client = arkprts.Client()
    await client.login_with_email("user@gmail.com")
    # or client.login_with_token("123456", "abcdefg")

    # get logged-in user data
    data = await client.get_data()
    print("Level: ", data.status.level)

    # get data of other users
    users = await client.search_user("UserName")
    print("Level: ", users[0].level)

Returned data is in the form of pydantic models, however you can also request raw json with client.get_raw_data() to access even untyped data.

For convenience, static game data is automatically downloaded and updated on login. You can access the static data directly or through the models. This is useful for getting names and descriptions of objects.

users = await client.search_user("UserName")
operator = users[0].assist_char_list[0]  # type: arkprts.models.Character
print(f"Assist operator {operator.static.name} is level {operator.level}")

To disable downloading static data use arkprts.Client(pure=True). To choose the data download location set client.gamedata = akprts.GameData("/path/to/data").

Contributing

Any kind of contribution is welcome. Please read CONTRIBUTING.md for more information.

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

arkprts-0.1.4.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

arkprts-0.1.4-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file arkprts-0.1.4.tar.gz.

File metadata

  • Download URL: arkprts-0.1.4.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for arkprts-0.1.4.tar.gz
Algorithm Hash digest
SHA256 300bd4efd87d313b26f004b0c1968b3cbc2510069256952e5dc72ef768ef8d7e
MD5 adfb4561beb1ac57675d8c21eca52525
BLAKE2b-256 a801c5a75807c193f526403fb5b9da2d84a83d340857d7f5028ff40343052ae4

See more details on using hashes here.

File details

Details for the file arkprts-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: arkprts-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 28.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for arkprts-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b6ecab6fc73ef770164724b9b8fb7f774fbbfff2a7ee2a770f58651f0186be63
MD5 5878702f34862e2763d3560a5872dde2
BLAKE2b-256 6e8e7a3ee2522d79ced2d4bb197d5e9200c9a0da5ed9051c62f4ae3e988ea1d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page