Skip to main content

GUANO, the "Grand Unified" bat acoustics metadata format

Project description

guano-py

This is the Python reference implementation for GUANO, the “Grand Unified Acoustic Notation Ontology”, a metadata format for bat acoustics recordings. It includes a production-ready Python module with full support for reading and writing GUANO metadata, as well as several helpful commandline utilities.

For more information about GUANO metadata itself, including the format specification, see the GUANO project homepage: http://guano-md.org

Documentation for guano-py can be found at: http://guano-py.readthedocs.io

Requirements

  • Python 2.7 or Python 3.3+

Installation

Download and install magically from the Python Package Index:

$> pip install -U guano

In addition to having the guano Python module available for use in your own software, you’ll also have a small collection of useful scripts to use.

Alternately, you can check out the project from GitHub and install locally in developer mode to hack on it yourself:

$> git clone https://github.com/riggsd/guano-py.git
$> cd guano-py
$> python setup.py develop

Build Status Documentation Status

API Usage

from guano import GuanoFile

# load a .WAV file with (or without) GUANO metadata
g = GuanoFile('test.wav')

# get and set metadata values like a Python dict
print g['GUANO|Version']
>>> 1.0

print g['Make'], g['Model']
>>> 'Pettersson', 'D500X'

g['Species Manual ID'] = 'Myso'

g['Note'] = 'I love GUANO!'

# namespaced fields can be specified separately or pipe-delimited
print g['PET', 'Gain'], g['PET|Gain']
>>> 80, 80

g['SB|Consensus'] = 'Epfu'
g['SB', 'Consensus'] = 'Epfu'

# print all the metadata values
for key, value in g.items():
    print '%s: %s' % (key, value)

# write the updated .WAV file back to disk
g.write()

# have some GUANO metadata from some other source? load it from a string
g = GuanoFile.from_string('GUANO|Version:1.0\nTags:voucher,hand-release')

# write GUANO metadata somewhere else, say an Anabat file or text file
with open('sidecar_file.guano', 'wb') as outfile:
    outfile.write( g.serialize() )

# teach the parser to recognize custom metadata fields
GuanoFile.register('Anabat', ['Humidity', 'Temperature'], float)
GuanoFile.register('SB', 'Thumbnail Image', guano.base64decode)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guano-1.0.15.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

guano-1.0.15-py2.py3-none-any.whl (20.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file guano-1.0.15.tar.gz.

File metadata

  • Download URL: guano-1.0.15.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.9

File hashes

Hashes for guano-1.0.15.tar.gz
Algorithm Hash digest
SHA256 c38faa71d8fe3411320700d6120c784b9eb7dddf4ac620cdf0b7902551bad0ef
MD5 632cc7c0ed3192b24fbe66912d0df94d
BLAKE2b-256 3c65d9e284a906750e856f5f16b008432854b5cbe883346b63d57e3fc86ea082

See more details on using hashes here.

File details

Details for the file guano-1.0.15-py2.py3-none-any.whl.

File metadata

  • Download URL: guano-1.0.15-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.9

File hashes

Hashes for guano-1.0.15-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4ee5f09ea1eadc5ea7b6a43dedd657465f221063cdcd615da3c9ad4ab5d12db4
MD5 f54da4cc26715bf06262450c4ae4c5b4
BLAKE2b-256 b3a2a07aeac1b9038d524f89fc2999c282e0a3bf75da67d5c8fc9de74e344438

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