An async client for Movebank's API
Project description
Movebank Client
Introduction
The movebank-client is an unofficial async python client to interact with Movebank's API, developed by the Gundi team of EarthRanger,.
Installation
pip installmovebank-client
Usage
from movebank_client import MovebankClient
# You can use it as an async context-managed client
async with MovebankClient(
base_url="https://www.movebank.mpg.de",
username="your-user",
password="your-password",
) as client:
# Upload permissions for a study
async with aiofiles.open("permissions.csv", mode='rb') as perm_file:
await client.post_permissions(
study_name="your-study",
csv_file=perm_file
)
# Send tag data to a feed
async with aiofiles.open("data.json", mode='rb') as tag_data:
await client.post_tag_data(
feed_name="gundi/earthranger",
tag_id="your-tag-id",
json_file=tag_data
)
# Or create an instance and close the client explicitly later
client = MovebankClient()
# Send tag data to a feed
async with aiofiles.open("data.json", mode='rb') as tag_data:
await client.post_tag_data(
feed_name="gundi/earthranger",
tag_id="your-tag-id",
json_file=tag_data
)
...
await client.close() # Close the session used to send requests
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
movebank_client-1.0.0.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for movebank_client-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dca77e7023dede2cc4faf8fe2b9d54df32a063c88281ae407f665c5dcac10414 |
|
MD5 | e0222e4341d91b73d6063813b48a54b2 |
|
BLAKE2b-256 | 71d61df08f2e66f9139aa4ddd88a56271fcfb9ecaa58330ade9dd8deb2e2f664 |