Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
.. image:: https://img.shields.io/pypi/v/idigbio.svg :target: https://pypi.python.org/pypi/idigbio
.. image:: https://img.shields.io/travis/iDigBio/idigbio-python-client.svg :target: https://travis-ci.org/iDigBio/idigbio-python-client
A python client for the iDigBio <https://www.idigbio.org/>
_ iDigBio v2 API.
.. code-block::
pip install idigbio
If you want to use the Pandas Data Frame interface you need to install pandas as well.
.. code-block::
pip install idigbio pandas
If you see InsecurePlatformWarning or have other SSL certificate verification issues, you may wish to install urllib3 with the secure extra.
.. code-block::
pip install urllib3[secure]
Returning JSON from the API.
.. code-block:: python
import idigbio
api = idigbio.json()
json_output = api.search_records()
Returning a Pandas Data Frame.
.. code-block:: python
import idigbio
api = idigbio.pandas()
pandas_output = api.search_records()
See the Search API docs <https://github.com/idigbio/idigbio-search-api/wiki>
_ for info about
the endpoint parameters.
Examples ++++++++
View a Record By UUID
.. code-block:: python
import idigbio
api = idigbio.json()
record = api.view("records","1db58713-1c7f-4838-802d-be784e444c4a")
Search for a Record by scientific name
.. code-block:: python
import idigbio
api = idigbio.json()
record_list = api.search_records(rq={"scientificname": "puma concolor"})
Search for Records that have images
.. code-block:: python
import idigbio
api = idigbio.json()
record_list = api.search_records(rq={"scientificname": "puma concolor", "hasImage": True})
Search for a MediaRecords by record property
.. code-block:: python
import idigbio
api = idigbio.json()
mediarecord_list = api.search_media(rq={"scientificname": "puma concolor", "hasImage": True})
Create a heat map for a genus
.. code-block:: python
import idigbio
api = idigbio.json()
m = api.create_map(rq={"genus": "acer"}, t="geohash")
m.save_map_image("acer_map_geohash", 2)
Create a point map for a genus
.. code-block:: python
import idigbio
api = idigbio.json()
m = api.create_map(rq={"genus": "acer"}, t="points")
m.save_map_image("acer_map_points", 2)
Create a zoomed in point map for a bounding box
.. code-block:: python
import idigbio
api = idigbio.json()
bbox = {"type": "geo_bounding_box", "bottom_right": {"lat": 29.642979999999998, "lon": -82.00}, "top_left": {"lat": 29.66298, "lon": -82.35315800000001}}
m = api.create_map(
rq={"geopoint": bbox}
)
m.save_map_image("test.png", None, bbox=bbox)
Create a summary of kingdom and phylum data
.. code-block:: python
import idigbio
api = idigbio.json()
summary_data = api.top_records(fields=["kingdom", "phylum"])
Get the number of Records for a search by scientific name
.. code-block:: python
import idigbio
api = idigbio.json()
count = api.count_records(rq={"scientificname": "puma concolor"})
Get the number of MediaRecords for a search by scientific name
.. code-block:: python
import idigbio
api = idigbio.json()
count = api.count_media(rq={"scientificname": "puma concolor"})
Get the histogram of Collection Dates for a search by record property, for the last 10 years
.. code-block:: python
import idigbio
api = idigbio.json()
histogram_data = api.datehist(
rq={"scientificname": "puma concolor"},
top_fields=["institutioncode"], min_date="2005-01-01")
Development +++++++++++
To contribute code to this project, please submit a pull request to the repo on github:
https://github.com/idigbio/idigbio-python-client/
To set up a development environment, run the following from inside a python virtual environment in your local repo directory:
.. code-block::
pip install -e .
.. :changelog:
0.8.5 (2018-03-16) ++++++++++++++++++
New
0.8.4 (2017-06-07) ++++++++++++++++++
New
Changes
0.8.3.3 (2017-05-17) ++++++++++++++++++++
New
Changes
0.8.2 (2017-05-10) ++++++++++++++++++
New
0.8.1 (2016-08-29) ++++++++++++++++++
0.6.1 (2016-04-08) ++++++++++++++++++
Changes
0.6.0 (2016-03-30) ++++++++++++++++++
Changes
New
0.5.0 (2016-02-24) ++++++++++++++++++
Changes
data.*
fields if requested specificallystats
and datehist
api calls to respect parameters;
param names changed to use python style and match server params.0.4.3 (2016-02-23) ++++++++++++++++++
Bugfixes
Miscellaneous
FAQs
Python Client for the iDigBio Search API
We found that idigbio demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.