Skip to main content

Add your description here

Project description

pygenezys

An unofficial Python client for Genezys.

Disclaimer: this is an unofficial, community-built client. It is not affiliated with, endorsed by, or supported by Genezys. It talks to undocumented, internal API endpoints, which may change or break without notice. Use of these endpoints may be subject to Genezys's Terms of Service — use at your own risk.

Installation

pip install pygenezys

Getting a token

pygenezys does not log in on your behalf — you provide your own session token, the same one the website itself uses:

  1. Log into app.genezys.xyz in your browser.
  2. Open your browser's developer tools (F12) and go to the Network tab.
  3. Reload the page and find any request to app.genezys.xyz.
  4. Copy the value of the Authorization request header — that's your token.

This token is short-lived (roughly one hour). Once it expires, repeat the steps above to get a new one and pass it to set_token() (see below) instead of creating a new client.

Quickstart

from pygenezys import GenezysClient

client = GenezysClient("your-token-here")

print(client.user.get_username())
print(client.user.get_gnz())
print(client.cup.get_available_cups_id())

When your token expires, swap in a fresh one on the same client instead of re-instantiating:

client.set_token("your-new-token-here")

Available resources

Each resource is namespaced on the client and mirrors a Genezys feature area:

Resource Examples
client.user get_username(), get_gnz(), get_gems(), get_user_id()
client.cup get_available_cups_id(), get_available_cups_info()
client.arena get_arena_info()
client.average_price average_prices()
client.challenges get_challenges_info()
client.deck build_deck_division(card_info), build_deck_commun_cup(card_info), etc.
client.match run_division_match(), run_cup_match(cup_id)
client.match_history get_match_history(numberof_matches=10)
client.mission get_missions()
client.my_cards get_my_cards(order='desc', sortBy='baseScore', max_results=20)
client.market get_market(order='desc', sortBy='date', max_results=20)
client.ranking cup_leaderboard(cup_id, max_results=10), division_leaderboard(max_results)
client.rewards get_daily_rewards_info(), get_missions_info()
client.transaction_history get_transaction_history(numberof_matches=10)

client.deck.build_deck_*() and client.match.run_*_match() mutate your real account state (they change your live deck / queue a real match) — use them deliberately, they make real action.

Forms of answers

You can find every exemple of every json answers and their expected field in pygenezys/tests /fixtures.

License

MIT

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

pygenezys-0.1.0.tar.gz (44.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygenezys-0.1.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file pygenezys-0.1.0.tar.gz.

File metadata

  • Download URL: pygenezys-0.1.0.tar.gz
  • Upload date:
  • Size: 44.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pygenezys-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6980859b517da8cef946cbdaffea377ab841ae634004a3f7278b913220cbac53
MD5 1d4c7a7b70bd70a1b393ffb969ec9b7e
BLAKE2b-256 b4f2c6b2a370638243399e768bc1d44b34a77bae88ebe9bfe09340ea4a5345da

See more details on using hashes here.

File details

Details for the file pygenezys-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pygenezys-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pygenezys-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7ba4869182c3c7f96960ecbb45d2be6b5ad66fcfd1918ccf0e6801bc5b277ae
MD5 ea512941f999f6ff7f05dfdd223c2067
BLAKE2b-256 61b8e0c1badc3383a7535f1acf6c311d04ba81ca37761432dbe75365d1faa58b

See more details on using hashes here.

Supported by

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