Name | encore-python JSON |
Version |
1.1.0
JSON |
| download |
home_page | |
Summary | Python API wrapper for encore.us |
upload_time | 2024-02-11 21:02:50 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 Josh Mcdaniel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
sng
.sng
clone hero
ch
file
sng-format
sng-parse
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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`).
## Instalation
### From pip
``` shell
pip install encore-python
```
### From repository
``` shell
git clone https://github.com/joshrmcdaniel/encore-python.git
cd encore-python
pip install -e .
```
## Usage
### Basic Search
To perform a basic search by track name, album, artist, genre, or year:
```python
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:
```python
# Advanced search by artist with additional filters
response = api.search_by_artist("Artist Name", exact=True)
```
### Iterating search results
The ability to iterate through all results is avaiable with the `iter_results` arg
### Downloading Tracks
Downloading tracks is available. Available options include: sng file, convert from the sng format to the directory format, and returning a buffer.
To download a track:
```python
# With the hash as a sng file
api.download("abcedf....")
# With the song json
search_res = api.search("Jeff")
song = search_res.data[0]
api.download(song)
```
This will download a track into the current working directory with the filename of the download hash, with `.sng`
Downloading a track and converting it
``` python
search_res = api.search("Jeff")
song = search_res.data[0]
api.download(song, as_sng=False)
```
See [sng-format-python](https://github.com/joshrmcdaniel/sng-format-python/blob/v1.1.0/README.md#usage) docs for other sng conversion args.
## 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.
Raw data
{
"_id": null,
"home_page": "",
"name": "encore-python",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "sng,.sng,clone hero,ch,file,sng-format,sng-parse",
"author": "",
"author_email": "Josh Mcdaniel <80354972+joshrmcdaniel@users.noreply.github.com>",
"download_url": "",
"platform": null,
"description": "# encore-python\nPython API wrapper for encore.us\n\n## Features\n\n- **Music Search**: Perform searches by track name, album, artist, genre, and year with both basic and advanced filtering options.\n- **Download Tracks**: Download music tracks directly using the song identifier or a `Song` object.\n- **Rate Limit Handling**: Automatically handles API rate limits, providing feedback on the remaining number of queries and reset times.\n- **Flexible Search Queries**: Supports both simple string queries and structured search objects (`BasicSearch` and `AdvancedSearch`).\n\n## Instalation\n### From pip\n``` shell\npip install encore-python\n```\n\n### From repository\n``` shell\ngit clone https://github.com/joshrmcdaniel/encore-python.git\ncd encore-python\npip install -e .\n```\n\n## Usage\n\n### Basic Search\n\nTo perform a basic search by track name, album, artist, genre, or year:\n\n```python\nfrom encore_python import EncoreAPI\n\napi = EncoreAPI()\n\n# Basic search by track name\nresponse = api.search(\"Track Name\")\n```\n\n### Advanced Search\n\nFor more complex queries involving multiple criteria:\n\n```python\n# Advanced search by artist with additional filters\nresponse = api.search_by_artist(\"Artist Name\", exact=True)\n```\n### Iterating search results\nThe ability to iterate through all results is avaiable with the `iter_results` arg\n\n### Downloading Tracks\nDownloading tracks is available. Available options include: sng file, convert from the sng format to the directory format, and returning a buffer. \n\n\nTo download a track:\n\n```python\n# With the hash as a sng file\napi.download(\"abcedf....\")\n# With the song json\nsearch_res = api.search(\"Jeff\")\nsong = search_res.data[0]\napi.download(song)\n```\nThis will download a track into the current working directory with the filename of the download hash, with `.sng`\n\nDownloading a track and converting it\n\n``` python\nsearch_res = api.search(\"Jeff\")\nsong = search_res.data[0]\napi.download(song, as_sng=False)\n```\n\nSee [sng-format-python](https://github.com/joshrmcdaniel/sng-format-python/blob/v1.1.0/README.md#usage) docs for other sng conversion args.\n\n## Contributing\n\nContributions to the encore-python are welcome.\n\n## License\n\nencore-python is released under the MIT License. See the LICENSE file in the repository for more details.\n\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Josh Mcdaniel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Python API wrapper for encore.us",
"version": "1.1.0",
"project_urls": {
"homepage": "https://github.com/joshrmcdaniel/encore-python"
},
"split_keywords": [
"sng",
".sng",
"clone hero",
"ch",
"file",
"sng-format",
"sng-parse"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b122a0486bb28aa846388ee7cd88a871701979c1a1c1c0429d943f7b122f4d10",
"md5": "27be3f05018208e8b9b66ebdeca7260a",
"sha256": "cfc48f402e116d16a2da2b26cd3ad8c2d1b6ce390f1a4cc33d195ec192f55ae6"
},
"downloads": -1,
"filename": "encore_python-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "27be3f05018208e8b9b66ebdeca7260a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 14112,
"upload_time": "2024-02-11T21:02:50",
"upload_time_iso_8601": "2024-02-11T21:02:50.121015Z",
"url": "https://files.pythonhosted.org/packages/b1/22/a0486bb28aa846388ee7cd88a871701979c1a1c1c0429d943f7b122f4d10/encore_python-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-11 21:02:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "joshrmcdaniel",
"github_project": "encore-python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "encore-python"
}