ebird-api 3.1.1__tar.gz → 3.2.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.
- {ebird_api-3.1.1 → ebird_api-3.2.0}/CHANGELOG.md +4 -0
- {ebird_api-3.1.1/src/ebird_api.egg-info → ebird_api-3.2.0}/PKG-INFO +1 -1
- {ebird_api-3.1.1 → ebird_api-3.2.0}/pyproject.toml +2 -2
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/__init__.py +2 -1
- ebird_api-3.2.0/src/ebird/api/species.py +37 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0/src/ebird_api.egg-info}/PKG-INFO +1 -1
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird_api.egg-info/SOURCES.txt +1 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/LICENSE.txt +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/README.md +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/setup.cfg +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/setup.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/checklists.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/client.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/constants.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/hotspots.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/observations.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/regions.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/statistics.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/taxonomy.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/utils.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird/api/validation.py +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird_api.egg-info/dependency_links.txt +0 -0
- {ebird_api-3.1.1 → ebird_api-3.2.0}/src/ebird_api.egg-info/top_level.txt +0 -0
|
@@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
|
8
8
|
This project adheres to [PEP440](https://www.python.org/dev/peps/pep-0440/)
|
|
9
9
|
and by implication, [Semantic Versioning](http://semver.org/).
|
|
10
10
|
|
|
11
|
+
## [3.2.0] - 2024-12-30
|
|
12
|
+
- Add get_species_list which returns the list of codes for species seen
|
|
13
|
+
in a country, subnational1 are, subnational2 area or hotspot.
|
|
14
|
+
|
|
11
15
|
## [3.1.1] - 2024-12-30
|
|
12
16
|
## Changed
|
|
13
17
|
- URLs calling the api are now in the form, https://api.ebird.org/v2/...
|
|
@@ -30,7 +30,7 @@ license = {text = "MIT License"}
|
|
|
30
30
|
name = "ebird-api"
|
|
31
31
|
readme = "README.md"
|
|
32
32
|
requires-python = ">= 3.8"
|
|
33
|
-
version = "3.
|
|
33
|
+
version = "3.2.0"
|
|
34
34
|
|
|
35
35
|
[project.urls]
|
|
36
36
|
Repository = "https://github.com/ProjectBabbler/ebird-api.git"
|
|
@@ -38,7 +38,7 @@ Issues = "https://github.com/ProjectBabbler/ebird-api/issues"
|
|
|
38
38
|
Changelog = "https://github.com/ProjectBabbler/ebird-api/blob/master/CHANGELOG.md"
|
|
39
39
|
|
|
40
40
|
[tool.bumpversion]
|
|
41
|
-
current_version = "3.
|
|
41
|
+
current_version = "3.2.0"
|
|
42
42
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
43
43
|
serialize = ["{major}.{minor}.{patch}"]
|
|
44
44
|
ignore_missing_version = false
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""A set of wrapper functions for accessing the eBird API."""
|
|
4
4
|
|
|
5
|
-
__version__ = "3.
|
|
5
|
+
__version__ = "3.2.0"
|
|
6
6
|
|
|
7
7
|
from ebird.api.checklists import get_checklist, get_visits
|
|
8
8
|
from ebird.api.client import Client
|
|
@@ -19,6 +19,7 @@ from ebird.api.observations import (
|
|
|
19
19
|
get_species_observations,
|
|
20
20
|
)
|
|
21
21
|
from ebird.api.regions import get_adjacent_regions, get_region, get_regions
|
|
22
|
+
from ebird.api.species import get_species_list
|
|
22
23
|
from ebird.api.statistics import get_top_100, get_totals
|
|
23
24
|
from ebird.api.taxonomy import (
|
|
24
25
|
get_taxonomy,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Functions for fetching information about species."""
|
|
2
|
+
|
|
3
|
+
from ebird.api.utils import call
|
|
4
|
+
from ebird.api.validation import clean_area
|
|
5
|
+
|
|
6
|
+
SPECIES_LIST_URL = "https://api.ebird.org/v2/product/spplist/%s"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def get_species_list(token, area):
|
|
10
|
+
"""
|
|
11
|
+
Get the list of species for an area.
|
|
12
|
+
|
|
13
|
+
The maps to the two end points in the eBird API 2.0,
|
|
14
|
+
https://documenter.getpostman.com/view/664302/S1ENwy59?version=latest#55bd1b26-6951-4a88-943a-d3a8aa1157dd
|
|
15
|
+
|
|
16
|
+
:param token: the token needed to access the API.
|
|
17
|
+
|
|
18
|
+
:param area: the code for a country, subnational1 region, subnational2
|
|
19
|
+
region or location.
|
|
20
|
+
|
|
21
|
+
:return: codes, e.g. horlar1, for the list of species observed in the area.
|
|
22
|
+
|
|
23
|
+
:raises ValueError: if any of the arguments fail the validation checks.
|
|
24
|
+
|
|
25
|
+
:raises URLError if there is an error with the connection to the
|
|
26
|
+
eBird site.
|
|
27
|
+
|
|
28
|
+
:raises HTTPError if the eBird API returns an error.
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
url = SPECIES_LIST_URL % clean_area(area)
|
|
32
|
+
|
|
33
|
+
headers = {
|
|
34
|
+
"X-eBirdApiToken": token,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return call(url, {}, headers)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|