bird-colony
bird-colony is a Django application the Meliza Lab uses to manage its zebra finch colony and keep breeding records. You may find it useful, even if you work with non-avian species.
Features:
Animals have globally unique identifiers and can optionally have colored and numbered leg bands (one band per animal). This means they keep their identities even if you have to reband them.
Record events over the lifespan of each animal, from egg to grave. Events can be linked to locations, so you can find where an animal is or was on a certain date. Events can also be linked to measurements like weight so you can track these over time or use them to make breeding decisions.
Track pairings, pedigrees, and breeding success statistics. You can export a complete pedigree for all living birds in the colony and compute relatedness using external software like the R pedigree package.
Useful forms for entering data, including periodic nest checks. Easy to track when eggs are laid and hatch and associate them with the correct parents.
Associate biological samples with animals and track their physical location.
You’ll need to have a basic understanding of how to use Django. bird-colony is licensed for you to use under the BSD License. See COPYING for details
Quick start
Requires Python 3.11+. Runs on Django 5.2 LTS and 6.1.
Install the package using pip: pip install django-bird-colony.
Add birds and some dependencies to your INSTALLED_APPS setting like this:
INSTALLED_APPS = (
...
'widget_tweaks', # For form tweaking
'rest_framework',
'django_filters',
'fullurl',
'birds',
)
Include birds in urlpatterns in your project urls.py. Some of the views link to the admin interface, so make sure that is included, too:
path("birds/", include("birds.urls")),
path("admin/", admin.site.urls),
Run python manage.py migrate to create the database tables. If this is a new django install, run python manage.py createsuperuser to create your admin user.
Run python manage.py loaddata bird_colony_starter_kit to create some useful initial records.
Start the development server (python manage.py runserver) and visit http://127.0.0.1:8000/admin/birds/ to set up your colony, as described in the next section.
Visit http://127.0.0.1:8000/birds/ to use views.
Make sure to consult the Django documentation on deployment if you are at all concerned about security.
Initial setup
This is a work in progress. Before you start entering birds and events, you need to set up some tables using the Django admin app.
Required steps:
Edit species records in the Species table. The bird_colony_starter_kit fixture will create a record for zebra finches. The code field is used to give animals their names, so if you have zebra finches and use zebf as your code, your birds will be named zebf_red_1 and so forth.
Edit and add locations to the Locations table. You need to have at least one location created. The main use for this field is to allow you to find where a bird is by looking at the last event. Mark the locations where pairs are kept as nests, so they can be chosen when you create a pairing. Locations can also be grouped into rooms, and inactive locations are not offered in forms.
Edit and create new event types in the Status codes table. The application looks up some event types by name, so the table needs to include hatched, laid, banded, died, moved, note, reservation, and bad egg. The bird_colony_starter_kit fixture creates these, plus transferred in and transferred out. For each status code, indicate whether it adds a bird to the colony (an egg being laid, a birth, or a transfer in) or removes one (an expected or unexpected death or removal). Unexpected removals are important to tabulate when looking at family history and breeding success. When you create an event that removes a bird, it will appear as no longer alive. The hatched event is special, because if you add a bird to the database using the Add new bird view using this code, the system will require you to enter the bird’s parents. (If you don’t know the bird’s parents, you can always create it manually in the admin interface)
Optional steps:
If your bands are colored, add your colors to the Band colors table. This will affect the short name for your animals. Only colors with the kind available are offered when you add an animal or band a bird. Mark colors you no longer use as historical, and colors from other labs as external, so that existing animals keep their bands without cluttering the forms.
If you’re going to be adding samples to the databse, add or edit Sample locations and Sample types in the admin interface.
Add additional users to the database. Every event records who entered it, so add a user for each person who will be entering data.
Add tags to the Tags model. Each bird can be tagged with zero or more of these. Tags are used for reservations and for searching which birds were used for different experiments.
If you want to change some of the boilerplate text on the entry forms, you’ll need to install the app from source. The templates are found under birds/templates/birds in the source directory.
Development
Recommend using uv for development.
Run uv sync to create a virtual environment and install dependencies. uv sync --no-dev --frozen for deployment.
Testing: uv run pytest. Tests use an in-memory sqlite database by default; set BIRDS_TEST_DB=postgres (and install the postgres dependency group) to use a postgres server configured with POSTGRES_* environment variables, as on CI.
Changelog
See CHANGELOG.rst.
Metadata
Release files for django-bird-colony 0.15.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_bird_colony-0.15.0.tar.gz | 86.5 kB | With provenance | Details for django_bird_colony-0.15.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_bird_colony-0.15.0-py3-none-any.whl | Python 3 | none | any | Details for django_bird_colony-0.15.0-py3-none-any.whl |
Total release size: 221.7 kB
Release files / django_bird_colony-0.15.0.tar.gz
| Download URL | django_bird_colony-0.15.0.tar.gz |
|---|---|
| Size | 86.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
431e9b51eeb928584600dac80b53d7dae097dc37c57b75438aab89234b7db42a
|
|
BLAKE2b-256 checksum How to use checksums |
dfe650db1945289c53da8253905104291f36acd827d107536e1b70b44037b698
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / django_bird_colony-0.15.0-py3-none-any.whl
| Download URL | django_bird_colony-0.15.0-py3-none-any.whl |
|---|---|
| Size | 135.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68a91b1f047d7cd0b2b1ff2e41be3baf1b71f665db5d3d717b89a81723db48e8
|
|
BLAKE2b-256 checksum How to use checksums |
62796290907cee27b56a8999d67da8c9bfdf47822588c7c99e177caead5a1541
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logSecurity for django-bird-colony 0.15.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for django_bird_colony-0.15.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.