A XenoCanto API wrapper for Python
Project description
CantoPy
CantoPy is an API wrapper and download utility designed for easy scraping of animal sound recordings from the Xeno-Canto database.
Installation
Download the latest published version of this package from PyPI by running the following command:
pip install cantopy
Usage
The CantoPy package contains three main components to look up and download recordings from the Xeno-Canto API: the Query class, FetchManager, and DownloadManager.
The following example demonstrates how to use these components to retrieve high-quality recordings of a common blackbird (Turdus merula):
from cantopy import Query, FetchManager, DownloadManager
# Initialize the search query
query = Query(species_name="common blackbird", quality="A")
# Find matching query results on the Xeno-Canto database
query_result = FetchManager.send_query(query, max_pages=3)
# Initialize a DownloadManager
download_manager = DownloadManager("<download_base_folder>", max_workers=2)
# Download the corresponding recordings of the retrieved results
download_manager.download_all_recordings_in_queryresult(query_result)
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cantopy-0.2.5.tar.gz.
File metadata
- Download URL: cantopy-0.2.5.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4df2de7239babf265a9ca63e3aea2a59f9f1fc43f72d909e78184438c0bcd3a
|
|
| MD5 |
5de64557a563aca492b40812b016f150
|
|
| BLAKE2b-256 |
2bdd3fea5f6acda4cf00aa4719f4c6df75b39cacbc2563168baeacbb103b9ca9
|
File details
Details for the file cantopy-0.2.5-py3-none-any.whl.
File metadata
- Download URL: cantopy-0.2.5-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1701e0b8925bd29e965c1b668f1cd9dffb131c42018ddbd0359dcc559ec16931
|
|
| MD5 |
19202740e770f11d77b570dfbb4c0045
|
|
| BLAKE2b-256 |
4da6c644f81d5f7af853ac9a05bbfe47f3415c6600cc770f1862ef6b205dcc54
|