Skip to main content

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 patch (Github only)

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.
  • items.pkl: Contains data for all Dota 2 items.

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.

This project is runs with help of dotabuff/d2vpkr

Metadata

Release files for pydotaconstants 1.1.2.post15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydotaconstants 1.1.2.post15
File Size Uploaded Provenance
pydotaconstants-1.1.2.post15.tar.gz 3.2 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pydotaconstants 1.1.2.post15
File Interpreter ABI Platform
pydotaconstants-1.1.2.post15-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 MB

Release files / pydotaconstants-1.1.2.post15.tar.gz

Download URL pydotaconstants-1.1.2.post15.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e7776bd72570fd09d47c13669ca4402f264a65621e305ea6abfc5ce988511947
BLAKE2b-256 checksum
How to use checksums
74ce3b5ad0b7c21270b5656c5392ae4f20b3b7c6bc5995a52c32dc43aa764d8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pydotaconstants-1.1.2.post15-py3-none-any.whl

Download URL pydotaconstants-1.1.2.post15-py3-none-any.whl
Size 3.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1e4da7930626f306c8bcf3bba9edbfb6ab9f837a134d1a85e92320f0680dd54a
BLAKE2b-256 checksum
How to use checksums
20b5be84a098be86437355171672fd0e0d5ca1f451736df78c8fb570983a395b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pydotaconstants 1.1.2.post15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page