DOTA 2 constant parses
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.
Current version - 7.41c
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 are compiled as .pkl files and represented in the src/pydotaconstants/data directory.
git clone https://github.com/r41ngee/pydotaconstants.git
cd pydotaconstants
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 contains 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:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes and commit them (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature-branch). - 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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydotaconstants-1.1.0.tar.gz.
File metadata
- Download URL: pydotaconstants-1.1.0.tar.gz
- Upload date:
- Size: 7.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66cd7b2f97dda427566fc57e2b78cb27746f2eb7132b6929e592c8d28ae30f6e
|
|
| MD5 |
a4232a7ddf22445b39f2af94750d9e3e
|
|
| BLAKE2b-256 |
60f08382a8f1c41060103e5bc25e6a74315498910c67fe6ff60336c277d17029
|
File details
Details for the file pydotaconstants-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pydotaconstants-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d514464be018d565959f4f6c3f64079a6ec7a0c5d2be969cd3e44e265fdce2b
|
|
| MD5 |
df5e2d3e460d04a6c6e4c8f641c7fc97
|
|
| BLAKE2b-256 |
57c238d1980f417afcbae4ed243cedc79e316888b00a938024ec051006a77cf0
|