Hoops Dynasty Data Extraction
This repository contains CLI tools for extracting team and player data from the WhatifSports Hoops Dynasty Game. The CLI commands allow you to pull data for specified team or player IDs and optionally save the results to an Excel file. To use this
Note: this is not affiliated with whatifsports, hoops dynasty or fanball
Installation
Install CLI
.. code:: bash
pip install hoops_dynasty_api
Usage
-----
The CLI commands are defined using the click library. There are two main
commands: pull_hd_team_data and pull_hd_player_data.
**Note**: as of version 0.4.0 the –save-excel-file flag is automatically
set to True and does not need to be included to write out to excel
Pull Team Data
Use the pull-hd-team-data command to pull data for specific teams.
Arguments team_ids: The list of team IDs to pull data for (multiple values allowed).
Options –save-excel-file, -sef: Flag to save the output to the current path. –save-path, -sp: Path to save the output file (default is the current directory).
.. code:: bash
pull-hd-team-data 123 456 789 --save-excel-file --save-path /path/to/save
Pull Player Data
Use the pull-hd-player-data command to pull data for specific players.
**Arguments** player_ids: The list of player IDs to pull data for
(multiple values allowed).
**Options** –save-excel-file, -sef: Flag to save the output to the
current path. –save-path, -sp: Path to save the output file (default is
the current directory).
.. code:: bash
pull-hd-player-data 101 102 103 --save-excel-file --save-path /path/to/save
Pull Players by Team Ids
Use the pull-hd-players-by-team-id command to pull a file for each teams ids roster
Arguments player_ids: The list of player IDs to pull data for (multiple values allowed).
Options –save-excel-file, -sef: Flag to save the output to the current path. –save-path, -sp: Path to save the output file (default is the current directory).
.. code:: bash
pull-hd-players-by-team-id 1 2 3 --save-excel-file --save-path ./data
Errors
WebBrowserCreationError
^^^^^^^^^^^^^^^^^^^^^^^
At times the browser doesn’t build correctly and the run fails. just
click up and run your same command again, working on figuring this out
Development
-----------
Setup
~~~~~
To install repo and contribute first, clone the repository and navigate
to the project directory:
.. code:: bash
# clone project
git clone https://gitlab.com/whatifsports-data-integration/packages/hoops-dynasty-api
cd hoops-dynasty-api
# create virtual env and activate it
python -m venv .venv
source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
# install requirements
pip install -r requirements.txt
# Create a new branch and check it out
NEW_BRANCH="new-feature-branch" # Replace with your branch name
git checkout -b $NEW_BRANCH
Contribute
To contribute to this project, fork the repository, create a new branch, and submit a pull request.
.. code:: bash
git checkout -b feature-branch
Make your changes and commit them:
.. code:: bash
git commit -m "Description of the changes"
Push your changes to your fork:
.. code:: bash
git push origin feature-branch
Create a pull request from your feature branch to the main repository.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributors
- Zach Stocker (@zachstocker)
Metadata
Release files for hoops-dynasty-api 0.5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hoops_dynasty_api-0.5.4-py3-none-any.whl | Python 3 | none | any | Details for hoops_dynasty_api-0.5.4-py3-none-any.whl |
Release files / hoops_dynasty_api-0.5.4-py3-none-any.whl
| Download URL | hoops_dynasty_api-0.5.4-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ceaaad242ca2404cdd577c6649df81ce0e63a25aaf081264fbb33e45e83327fe
|
|
BLAKE2b-256 checksum How to use checksums |
a0e9455c0dc25c8b73e4c8d0daac7e372f28175612503ebfd42ccc1332041b94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for hoops-dynasty-api 0.5.4
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.