ebird-api-data 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. ebird_api_data-0.1.0/LICENSE +21 -0
  2. ebird_api_data-0.1.0/PKG-INFO +206 -0
  3. ebird_api_data-0.1.0/README.rst +155 -0
  4. ebird_api_data-0.1.0/pyproject.toml +158 -0
  5. ebird_api_data-0.1.0/setup.cfg +4 -0
  6. ebird_api_data-0.1.0/src/ebird/api/data/__init__.py +1 -0
  7. ebird_api_data-0.1.0/src/ebird/api/data/admin.py +394 -0
  8. ebird_api_data-0.1.0/src/ebird/api/data/apps.py +8 -0
  9. ebird_api_data-0.1.0/src/ebird/api/data/fields.py +47 -0
  10. ebird_api_data-0.1.0/src/ebird/api/data/loaders.py +485 -0
  11. ebird_api_data-0.1.0/src/ebird/api/data/management/__init__.py +0 -0
  12. ebird_api_data-0.1.0/src/ebird/api/data/management/commands/__init__.py +0 -0
  13. ebird_api_data-0.1.0/src/ebird/api/data/management/commands/add_checklists.py +124 -0
  14. ebird_api_data-0.1.0/src/ebird/api/data/migrations/0001_initial.py +927 -0
  15. ebird_api_data-0.1.0/src/ebird/api/data/migrations/__init__.py +0 -0
  16. ebird_api_data-0.1.0/src/ebird/api/data/models/__init__.py +21 -0
  17. ebird_api_data-0.1.0/src/ebird/api/data/models/checklist.py +178 -0
  18. ebird_api_data-0.1.0/src/ebird/api/data/models/country.py +29 -0
  19. ebird_api_data-0.1.0/src/ebird/api/data/models/county.py +29 -0
  20. ebird_api_data-0.1.0/src/ebird/api/data/models/filter.py +71 -0
  21. ebird_api_data-0.1.0/src/ebird/api/data/models/location.py +153 -0
  22. ebird_api_data-0.1.0/src/ebird/api/data/models/observation.py +189 -0
  23. ebird_api_data-0.1.0/src/ebird/api/data/models/observer.py +48 -0
  24. ebird_api_data-0.1.0/src/ebird/api/data/models/species.py +118 -0
  25. ebird_api_data-0.1.0/src/ebird/api/data/models/state.py +29 -0
  26. ebird_api_data-0.1.0/src/ebird/api/data/widgets.py +46 -0
  27. ebird_api_data-0.1.0/src/ebird_api_data.egg-info/PKG-INFO +206 -0
  28. ebird_api_data-0.1.0/src/ebird_api_data.egg-info/SOURCES.txt +30 -0
  29. ebird_api_data-0.1.0/src/ebird_api_data.egg-info/dependency_links.txt +1 -0
  30. ebird_api_data-0.1.0/src/ebird_api_data.egg-info/requires.txt +5 -0
  31. ebird_api_data-0.1.0/src/ebird_api_data.egg-info/top_level.txt +1 -0
  32. ebird_api_data-0.1.0/tests/test_loader.py +26 -0
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Stuart MacKay
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,206 @@
1
+ Metadata-Version: 2.4
2
+ Name: ebird-api-data
3
+ Version: 0.1.0
4
+ Summary: eBird API Data is a reusable Django app for loading data from eBird into a database.
5
+ Author-email: Stuart MacKay <smackay@flagstonesoftware.com>
6
+ License: The MIT License (MIT)
7
+
8
+ Copyright (c) 2025 Stuart MacKay
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Keywords: checklists,observations,species,Django,eBird,models
29
+ Classifier: Development Status :: 5 - Production/Stable
30
+ Classifier: Intended Audience :: Science/Research
31
+ Classifier: Framework :: Django
32
+ Classifier: Framework :: Django :: 4.2
33
+ Classifier: Framework :: Django :: 5.0
34
+ Classifier: Framework :: Django :: 5.1
35
+ Classifier: Framework :: Django :: 5.2
36
+ Classifier: License :: OSI Approved :: MIT License
37
+ Classifier: Natural Language :: English
38
+ Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Programming Language :: Python :: 3.11
40
+ Classifier: Programming Language :: Python :: 3.12
41
+ Classifier: Programming Language :: Python :: 3.13
42
+ Classifier: Topic :: Scientific/Engineering
43
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
44
+ Requires-Python: >=3.10
45
+ Description-Content-Type: text/x-rst
46
+ Requires-Dist: beautifulsoup4>=4.13.3
47
+ Requires-Dist: django>=4.2
48
+ Requires-Dist: ebird-api-requests>=4.0.1
49
+ Requires-Dist: ebird-codes>=0.0.2
50
+ Requires-Dist: lxml>=6.0.0
51
+
52
+ eBird API Data
53
+ ==============
54
+ eBird API Data is a reusable Django app for loading data from eBird into a database.
55
+
56
+ Overview
57
+ --------
58
+ .. overview-start
59
+
60
+ The Cornell Laboratory of Ornithology in Ithaca, New York runs the eBird database
61
+ which collects observations of birds from all over the world. All the observations
62
+ are published on `eBird.org`_, and they also make them available via an `API`_.
63
+ This project contains a loader and models to take data from the API and load it into
64
+ a database. From there you can analyse the data with python, jupyter notebooks, or
65
+ build a web site.
66
+
67
+ To get started, you will need to `sign up`_ for an eBird account, if you don't
68
+ already have one and `register`_ to get an API key. Make sure you read and
69
+ understand the `Terms of use`_, and remember bandwidth and servers cost money,
70
+ so don't abuse the service. If you need large numbers of observations, then
71
+ sign up to receive the `eBird Basic Dataset`_.
72
+
73
+ .. _eBird.org: https://ebird.org
74
+ .. _API: https://documenter.getpostman.com/view/664302/S1ENwy59
75
+ .. _sign up: https://secure.birds.cornell.edu/identity/account/create
76
+ .. _register: https://ebird.org/data/download
77
+ .. _Terms of use: https://www.birds.cornell.edu/home/ebird-api-terms-of-use/
78
+ .. _eBird Basic Dataset: https://science.ebird.org/en/use-ebird-data/download-ebird-data-products
79
+
80
+ .. overview-end
81
+
82
+ Install
83
+ -------
84
+ .. install-start
85
+
86
+ You can use either `pip`_ or `uv`_ to download the `package`_ from PyPI and
87
+ install it into a virtualenv:
88
+
89
+ .. code-block:: console
90
+
91
+ pip install ebird-api-data
92
+
93
+ or:
94
+
95
+ .. code-block:: console
96
+
97
+ uv add ebird-api-data
98
+
99
+ Update ``INSTALLED_APPS`` in your Django setting:
100
+
101
+ .. code-block:: python
102
+
103
+ INSTALLED_APPS = [
104
+ ...
105
+ ebird.api.data
106
+ ]
107
+
108
+ Finally, run the migrations to create the tables:
109
+
110
+ .. code-block:: python
111
+
112
+ python manage.py migrate
113
+
114
+ .. _pip: https://pip.pypa.io/en/stable/
115
+ .. _uv: https://docs.astral.sh/uv/
116
+ .. _package: https://pypi.org/project/ebird-api-data/
117
+
118
+ .. install-end
119
+
120
+ Demo
121
+ ----
122
+
123
+ .. demo-start
124
+
125
+ If you check out the code from the repository there is a fully functioning
126
+ Django site. It only contains the admin pages, but that is sufficient for
127
+ you to browse the data.
128
+
129
+ .. code-block:: console
130
+
131
+ git clone git@github.com:StuartMacKay/ebird-api-data.git
132
+ cd ebird-api-data
133
+
134
+ Create the virtual environment:
135
+
136
+ .. code-block:: console
137
+
138
+ uv venv
139
+
140
+ Activate it:
141
+
142
+ .. code-block:: console
143
+
144
+ source venv/bin/activate
145
+
146
+ Install the requirements:
147
+
148
+ .. code-block:: console
149
+
150
+ uv sync
151
+
152
+ Run the database migrations:
153
+
154
+ .. code-block:: console
155
+
156
+ python manage.py migrate
157
+
158
+ Create a user:
159
+
160
+ .. code-block:: console
161
+
162
+ python manage.py createsuperuser
163
+
164
+ Create a copy of the .env.example file and add your API key:
165
+
166
+ .. code-block:: console
167
+
168
+ cp .env.example .env
169
+
170
+ .. code-block:: console
171
+
172
+ EBIRD_API_KEY=<my api key>
173
+
174
+ Now, download data from the API:
175
+
176
+ .. code-block:: console
177
+
178
+ python manage.py add_checklists --days 2 US-NY-109
179
+
180
+ This loads all the checklists, submitted in the past two days by birders in
181
+ Tompkins County, New York, where the Cornell Lab is based. You can use any
182
+ location code used by eBird, whether it's for a country, state/region, or
183
+ county. Remember, read the terms of use.
184
+
185
+ Run the demo:
186
+
187
+ .. code-block:: console
188
+
189
+ python manage.py runserver
190
+
191
+ Now log into the `Django Admin <http:localhost:8000/admin>` to browse the tables.
192
+
193
+ .. demo-end
194
+
195
+ Project Information
196
+ -------------------
197
+
198
+ * Documentation: https://ebird-api-data.readthedocs.io/en/latest/
199
+ * Issues: https://github.com/StuartMacKay/ebird-api-data/issues
200
+ * Repository: https://github.com/StuartMacKay/ebird-api-data
201
+
202
+ The app is tested on Python 3.10+, and officially supports Django 4.2, 5.0 and 5.1.
203
+
204
+ eBird API Data is released under the terms of the `MIT`_ license.
205
+
206
+ .. _MIT: https://opensource.org/licenses/MIT
@@ -0,0 +1,155 @@
1
+ eBird API Data
2
+ ==============
3
+ eBird API Data is a reusable Django app for loading data from eBird into a database.
4
+
5
+ Overview
6
+ --------
7
+ .. overview-start
8
+
9
+ The Cornell Laboratory of Ornithology in Ithaca, New York runs the eBird database
10
+ which collects observations of birds from all over the world. All the observations
11
+ are published on `eBird.org`_, and they also make them available via an `API`_.
12
+ This project contains a loader and models to take data from the API and load it into
13
+ a database. From there you can analyse the data with python, jupyter notebooks, or
14
+ build a web site.
15
+
16
+ To get started, you will need to `sign up`_ for an eBird account, if you don't
17
+ already have one and `register`_ to get an API key. Make sure you read and
18
+ understand the `Terms of use`_, and remember bandwidth and servers cost money,
19
+ so don't abuse the service. If you need large numbers of observations, then
20
+ sign up to receive the `eBird Basic Dataset`_.
21
+
22
+ .. _eBird.org: https://ebird.org
23
+ .. _API: https://documenter.getpostman.com/view/664302/S1ENwy59
24
+ .. _sign up: https://secure.birds.cornell.edu/identity/account/create
25
+ .. _register: https://ebird.org/data/download
26
+ .. _Terms of use: https://www.birds.cornell.edu/home/ebird-api-terms-of-use/
27
+ .. _eBird Basic Dataset: https://science.ebird.org/en/use-ebird-data/download-ebird-data-products
28
+
29
+ .. overview-end
30
+
31
+ Install
32
+ -------
33
+ .. install-start
34
+
35
+ You can use either `pip`_ or `uv`_ to download the `package`_ from PyPI and
36
+ install it into a virtualenv:
37
+
38
+ .. code-block:: console
39
+
40
+ pip install ebird-api-data
41
+
42
+ or:
43
+
44
+ .. code-block:: console
45
+
46
+ uv add ebird-api-data
47
+
48
+ Update ``INSTALLED_APPS`` in your Django setting:
49
+
50
+ .. code-block:: python
51
+
52
+ INSTALLED_APPS = [
53
+ ...
54
+ ebird.api.data
55
+ ]
56
+
57
+ Finally, run the migrations to create the tables:
58
+
59
+ .. code-block:: python
60
+
61
+ python manage.py migrate
62
+
63
+ .. _pip: https://pip.pypa.io/en/stable/
64
+ .. _uv: https://docs.astral.sh/uv/
65
+ .. _package: https://pypi.org/project/ebird-api-data/
66
+
67
+ .. install-end
68
+
69
+ Demo
70
+ ----
71
+
72
+ .. demo-start
73
+
74
+ If you check out the code from the repository there is a fully functioning
75
+ Django site. It only contains the admin pages, but that is sufficient for
76
+ you to browse the data.
77
+
78
+ .. code-block:: console
79
+
80
+ git clone git@github.com:StuartMacKay/ebird-api-data.git
81
+ cd ebird-api-data
82
+
83
+ Create the virtual environment:
84
+
85
+ .. code-block:: console
86
+
87
+ uv venv
88
+
89
+ Activate it:
90
+
91
+ .. code-block:: console
92
+
93
+ source venv/bin/activate
94
+
95
+ Install the requirements:
96
+
97
+ .. code-block:: console
98
+
99
+ uv sync
100
+
101
+ Run the database migrations:
102
+
103
+ .. code-block:: console
104
+
105
+ python manage.py migrate
106
+
107
+ Create a user:
108
+
109
+ .. code-block:: console
110
+
111
+ python manage.py createsuperuser
112
+
113
+ Create a copy of the .env.example file and add your API key:
114
+
115
+ .. code-block:: console
116
+
117
+ cp .env.example .env
118
+
119
+ .. code-block:: console
120
+
121
+ EBIRD_API_KEY=<my api key>
122
+
123
+ Now, download data from the API:
124
+
125
+ .. code-block:: console
126
+
127
+ python manage.py add_checklists --days 2 US-NY-109
128
+
129
+ This loads all the checklists, submitted in the past two days by birders in
130
+ Tompkins County, New York, where the Cornell Lab is based. You can use any
131
+ location code used by eBird, whether it's for a country, state/region, or
132
+ county. Remember, read the terms of use.
133
+
134
+ Run the demo:
135
+
136
+ .. code-block:: console
137
+
138
+ python manage.py runserver
139
+
140
+ Now log into the `Django Admin <http:localhost:8000/admin>` to browse the tables.
141
+
142
+ .. demo-end
143
+
144
+ Project Information
145
+ -------------------
146
+
147
+ * Documentation: https://ebird-api-data.readthedocs.io/en/latest/
148
+ * Issues: https://github.com/StuartMacKay/ebird-api-data/issues
149
+ * Repository: https://github.com/StuartMacKay/ebird-api-data
150
+
151
+ The app is tested on Python 3.10+, and officially supports Django 4.2, 5.0 and 5.1.
152
+
153
+ eBird API Data is released under the terms of the `MIT`_ license.
154
+
155
+ .. _MIT: https://opensource.org/licenses/MIT
@@ -0,0 +1,158 @@
1
+ [build-system]
2
+ build-backend = "setuptools.build_meta"
3
+ requires = ["setuptools >= 61.0"]
4
+
5
+ [project]
6
+ name = "ebird-api-data"
7
+ version = "0.1.0"
8
+ description = "eBird API Data is a reusable Django app for loading data from eBird into a database."
9
+ keywords = ["checklists", "observations", "species", "Django", "eBird", "models"]
10
+ license = { file = "LICENSE" }
11
+ authors = [
12
+ {name = "Stuart MacKay", email = "smackay@flagstonesoftware.com"},
13
+ ]
14
+ readme = "README.rst"
15
+ requires-python = ">=3.10"
16
+ dependencies = [
17
+ "beautifulsoup4>=4.13.3",
18
+ "django>=4.2",
19
+ "ebird-api-requests>=4.0.1",
20
+ "ebird-codes>=0.0.2",
21
+ "lxml>=6.0.0",
22
+ ]
23
+ classifiers = [
24
+ "Development Status :: 5 - Production/Stable",
25
+ "Intended Audience :: Science/Research",
26
+ "Framework :: Django",
27
+ "Framework :: Django :: 4.2",
28
+ "Framework :: Django :: 5.0",
29
+ "Framework :: Django :: 5.1",
30
+ "Framework :: Django :: 5.2",
31
+ "License :: OSI Approved :: MIT License",
32
+ "Natural Language :: English",
33
+ "Programming Language :: Python :: 3.10",
34
+ "Programming Language :: Python :: 3.11",
35
+ "Programming Language :: Python :: 3.12",
36
+ "Programming Language :: Python :: 3.13",
37
+ "Topic :: Scientific/Engineering",
38
+ "Topic :: Scientific/Engineering :: Information Analysis",
39
+ ]
40
+
41
+ [tool.setuptools]
42
+ license-files = []
43
+
44
+ [tool.uv]
45
+ dev-dependencies = [
46
+ "bump-my-version>=0.29.0",
47
+ "django-environ>=0.11.2",
48
+ "factory-boy>=3.3.1",
49
+ "furo>=2024.8.6",
50
+ "pre-commit>=3.5.0",
51
+ "pygraphviz>=1.11",
52
+ "pytest-django>=4.9.0",
53
+ "pytest>=8.3.4",
54
+ "ruff>=0.8.4",
55
+ "sphinx>=7.1.2",
56
+ "tox-uv>=1.13.1",
57
+ "tox>=4.23.2",
58
+ "django-extensions>=3.2.3",
59
+ "psycopg2-binary>=2.9.10",
60
+ "ipython>=8.37.0",
61
+ ]
62
+
63
+ [tool.bumpversion]
64
+ current_version = "0.1.0"
65
+ parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
66
+ serialize = ["{major}.{minor}.{patch}"]
67
+ ignore_missing_version = false
68
+ tag = true
69
+ sign_tags = true
70
+ tag_name = "v{new_version}"
71
+ tag_message = "New version: {current_version} → {new_version}"
72
+ allow_dirty = false
73
+ commit = true
74
+ commit_args = "--no-verify"
75
+ message = "New version: {current_version} → {new_version}"
76
+ pre_commit_hooks = ["uv sync --upgrade", "git add uv.lock"]
77
+
78
+ [[tool.bumpversion.files]]
79
+ filename = "src/ebird/api/data/__init__.py"
80
+ search = '__version__ = "{current_version}"'
81
+ replace = '__version__ = "{new_version}"'
82
+
83
+ [[tool.bumpversion.files]]
84
+ filename = "docs/conf.py"
85
+ search = 'release = "{current_version}"'
86
+ replace = 'release = "{new_version}"'
87
+
88
+ [[tool.bumpversion.files]]
89
+ filename = "CHANGELOG.rst"
90
+ search = """
91
+ Latest
92
+ ------"""
93
+ replace = """
94
+ Latest
95
+ ------
96
+
97
+ {new_version} ({now:%Y-%m-%d})
98
+ ------------------"""
99
+
100
+ [[tool.bumpversion.files]]
101
+ filename = "pyproject.toml"
102
+ search = 'version = "{current_version}"'
103
+ replace = 'version = "{new_version}"'
104
+
105
+ [[tool.bumpversion.files]]
106
+ filename = "CITATION.cff"
107
+ search = "version: {current_version}"
108
+ replace = "version: {new_version}"
109
+
110
+ [[tool.bumpversion.files]]
111
+ filename = "CITATION.cff"
112
+ search = "^date-released: \\d{{4}}-\\d{{2}}-\\d{{2}}$"
113
+ replace = "date-released: {now:%Y-%m-%d}"
114
+ regex = true
115
+
116
+ [tool.coverage.run]
117
+ branch = true
118
+
119
+ [tool.isort]
120
+ multi_line_output = 3
121
+ include_trailing_comma = true
122
+
123
+ [tool.pytest.ini_options]
124
+ DJANGO_SETTINGS_MODULE = "demo.settings"
125
+ pythonpath = [
126
+ "."
127
+ ]
128
+ testpaths = [
129
+ "tests"
130
+ ]
131
+
132
+ [tool.tox]
133
+ legacy_tox_ini = """
134
+ [tox]
135
+ requires =
136
+ tox>=4.2
137
+ tox-uv>=1.11.3
138
+ envlist =
139
+ {py310,py311,py312}-django42
140
+ {py310,py311,py312}-django50
141
+ {py310,py311,py312, py313}-django51
142
+ {py310,py311,py312, py313}-django52
143
+
144
+ [testenv]
145
+ commands = pytest
146
+ deps =
147
+ pytest
148
+ pytest-django
149
+ django42: Django>=4.2,<4.3
150
+ django50: Django>=5.0,<5.1
151
+ django51: Django>=5.1,<5.2
152
+ django52: Django>=5.2,<5.3
153
+ django-environ
154
+ factory-boy
155
+ setenv =
156
+ DJANGO_SETTINGS_MODULE = demo.settings
157
+ PYTHONPATH = src
158
+ """
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"