Skip to main content

Add your description here

Project description

PyDotaConstants

PyDotaConstants is a Python library designed to provide structured access to Dota 2 hero and ability data. It allows developers to easily retrieve hero and ability information based on their code names and display names. This project is particularly useful for creating applications and tools that require detailed insights into Dota 2's capabilities and characters.

Features

  • Retrieve hero information by codename, ID, or display name.
  • Access ability information similarly through codename or display name.
  • Data is loaded from pre-compiled binary files, ensuring fast access and processing.
  • Supports a structured schema for hero and ability data that can be easily navigated.

Installation and Setup

To install the PyDotaConstants library, simply clone the repository and ensure the necessary data files are in place. The current data files must be compiled as .pkl files as represented in the src/pydotaconstants/data directory.

git clone https://github.com/yourusername/pydotaconstants.git
cd pydotaconstants

Make sure to run the _update.py script to generate the necessary data files if they are not already provided.

python src/_update.py

Basic Usage

To use the library, you can import the desired classes and access hero or ability data as shown below:

from pydotaconstants import Hero, Ability

# Get hero by codename
hero = Hero.getByName("npc_dota_hero_axe")
print(hero.displayName)  # Output: Axe

# Get ability by display name
ability = Ability.getByDisplayName("Hex")
print(ability.displayDescription)

Configuration

This library expects certain pre-compiled data files:

  • heroes.pkl: Contains data for all Dota 2 heroes.
  • abilities.pkl: Contains data for all Dota 2 abilities.
  • locals.pkl: Contains localization strings for heroes and abilities.

Make sure these files are located in the src/pydotaconstants/data directory for the library to function correctly.

Contributing Guidelines

Contributions to PyDotaConstants are welcome. To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a Pull Request detailing your changes.

Please ensure any new features include tests and documentation updates as necessary.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

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

pydotaconstants-1.0.0b1.tar.gz (7.2 MB view details)

Uploaded Source

Built Distribution

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

pydotaconstants-1.0.0b1-py3-none-any.whl (7.3 MB view details)

Uploaded Python 3

File details

Details for the file pydotaconstants-1.0.0b1.tar.gz.

File metadata

  • Download URL: pydotaconstants-1.0.0b1.tar.gz
  • Upload date:
  • Size: 7.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","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 pydotaconstants-1.0.0b1.tar.gz
Algorithm Hash digest
SHA256 1712e84a9e18c9f787ac0a4178786651a686c575f6eeee54fcc781df3e792fdf
MD5 bf5ace65c827e43aefd55e61497646bb
BLAKE2b-256 54319dc36e8bcc52c634747dc672801c9c22d9af6d88791739e49f28432df3c8

See more details on using hashes here.

File details

Details for the file pydotaconstants-1.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: pydotaconstants-1.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 7.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","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 pydotaconstants-1.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 42061a2d53fb5ba6018ad925fc2473ed1efab79a5a5520e262e88cd392821840
MD5 c65effcf6e38bb4c51c0b84e8b3f6e9c
BLAKE2b-256 783385cb2820f26165f43080b7ce2d46a4f99c66f0852df6e5f641426709ac32

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