Python API wrapper for encore.us
Project description
encore-python
Python API wrapper for encore.us
Features
- Music Search: Perform searches by track name, album, artist, genre, and year with both basic and advanced filtering options.
- Download Tracks: Download music tracks directly using the song identifier or a
Song
object. - Rate Limit Handling: Automatically handles API rate limits, providing feedback on the remaining number of queries and reset times.
- Flexible Search Queries: Supports both simple string queries and structured search objects (
BasicSearch
andAdvancedSearch
).
Installation
To install encore-python, clone the repo and run:
cd encore-python
pip install -e .
Usage
Basic Search
To perform a basic search by track name, album, artist, genre, or year:
from encore_python import EncoreAPI
api = EncoreAPI()
# Basic search by track name
response = api.search("Track Name")
Advanced Search
For more complex queries involving multiple criteria:
# Advanced search by artist with additional filters
response = api.search_by_artist("Artist Name", exact=True)
Downloading Tracks
To download a track:
# With the hash
song_content = api.download("abcedf....")
# With the song json
search_res = api.search("Query")
song_content = api.download(search_res.data[0])
with open("song_name.sng", "wb") as f:
f.write(song_content)
Contributing
Contributions to the encore-python are welcome.
License
encore-python is released under the MIT License. See the LICENSE file in the repository 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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file encore_python-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: encore_python-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.6 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.64.1 urllib3/1.26.16 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7625dc980bae388536dcaa5284202bb3bd5c89b1fa76e88b62681539567ec84a |
|
MD5 | 8afa9a2e662b7d74c6deddefb48edf13 |
|
BLAKE2b-256 | def0a286e13aa34140390d71794e82308973f236f90d83a9617422565bc20630 |