Skip to main content

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 and AdvancedSearch).

Installation

To install encore-python, run:

cd encore-python 
pip install encore-python

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


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

encore_python-1.0.0.post1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file encore_python-1.0.0.post1-py3-none-any.whl.

File metadata

  • Download URL: encore_python-1.0.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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

Hashes for encore_python-1.0.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 0be824b58fe2b32670e4b29e3433545bf91e1ee40192efc31fbc22026437a88f
MD5 1f512e5b2971cac87a70f67e6329a2b2
BLAKE2b-256 290e7698c46059f784a3c7e81c5e2d3f01041d25fc94ab21582d9cdbd0971ff5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page