Skip to main content

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 3.6+

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

Master:Master Tests Dev:Dev Tests 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)

Metadata

Release files for guano 1.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for guano 1.0.16
File Size Uploaded
guano-1.0.16.tar.gz 19.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for guano 1.0.16
File Interpreter ABI Platform
guano-1.0.16-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 41.2 kB

Release files / guano-1.0.16.tar.gz

Download URL guano-1.0.16.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
59b418bf15f858f5708ab81d8c8503c757f9b52875d3ab5873ad9663b220f636
BLAKE2b-256 checksum
How to use checksums
1e4486b184759934b224699f24769c95c8ea8e22c1216f07f1828bc721ce5418
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / guano-1.0.16-py2.py3-none-any.whl

Download URL guano-1.0.16-py2.py3-none-any.whl
Size 21.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e0038732d26466e641db221b74a3560cd5ac956150077d1efccb9427a0d02158
BLAKE2b-256 checksum
How to use checksums
a37bc5a4ccb080bb3a19b2392bff4856fff750ee29ae3cc401a331aedfb633cb
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.16 This release

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page