A simple Django app for managing a bird breeding colony
Project description
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.10+. Runs on Django 4.2 LTS and 5.2 LTS.
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 migrate.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.
Edit and create new event types in the Status codes table. Common event types include laid, hatched, added, moved, died, used for anatomy, etc. For each status code, indicate whether it adds or removes a bird from the colony. Addition event types include eggs being laid, births, and transfers, which are handled differently. Removal event types include expected and unexpected deaths. Unexpected deaths 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 Colors table. This will affect the short name for your animals.
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. This is particularly useful if you want to allow specific users to reserve animals.
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. Requires a test database, will use settings from inventory/test/settings.py.
Changelog
In the 0.4.0 release, the primary key for animal records became the animal’s uuid. To migrate from previous version, data must be exported as JSON under the 0.3.999 release and then imported under 0.4.0
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 django_bird_colony-0.14.1.tar.gz.
File metadata
- Download URL: django_bird_colony-0.14.1.tar.gz
- Upload date:
- Size: 80.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcb03fea84910c1c91a77b9b08877b45eede7dbed54c286b3fd0ab4f3e015925
|
|
| MD5 |
23393e03272674d714b6e3db2896a5f8
|
|
| BLAKE2b-256 |
de620e8a5343e05251a07eec767518759bc382cd0241bc5c1dc9004dc2070373
|
Provenance
The following attestation bundles were made for django_bird_colony-0.14.1.tar.gz:
Publisher:
publish-to-pypi.yml on melizalab/django-bird-colony
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_bird_colony-0.14.1.tar.gz -
Subject digest:
bcb03fea84910c1c91a77b9b08877b45eede7dbed54c286b3fd0ab4f3e015925 - Sigstore transparency entry: 964188920
- Sigstore integration time:
-
Permalink:
melizalab/django-bird-colony@779539156f770d40f8fe32ae30fa7c658cfd59dd -
Branch / Tag:
refs/tags/v0.14.1 - Owner: https://github.com/melizalab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@779539156f770d40f8fe32ae30fa7c658cfd59dd -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_bird_colony-0.14.1-py3-none-any.whl.
File metadata
- Download URL: django_bird_colony-0.14.1-py3-none-any.whl
- Upload date:
- Size: 131.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97366fe02a413916270d0f70e5468e25ec9984a42f07f634280a351693cb816a
|
|
| MD5 |
6289e0610016200f9d81b3e30eb407ed
|
|
| BLAKE2b-256 |
1fa64bb495ab2aa666f77153050bbdc5c893054a933f77cc5faa8d3572ed4097
|
Provenance
The following attestation bundles were made for django_bird_colony-0.14.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on melizalab/django-bird-colony
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_bird_colony-0.14.1-py3-none-any.whl -
Subject digest:
97366fe02a413916270d0f70e5468e25ec9984a42f07f634280a351693cb816a - Sigstore transparency entry: 964188979
- Sigstore integration time:
-
Permalink:
melizalab/django-bird-colony@779539156f770d40f8fe32ae30fa7c658cfd59dd -
Branch / Tag:
refs/tags/v0.14.1 - Owner: https://github.com/melizalab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@779539156f770d40f8fe32ae30fa7c658cfd59dd -
Trigger Event:
push
-
Statement type: