
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
A client to the FAIRsharing API.
FAIRsharing is a registry of high-quality metadata about standards, databases, and policies. However, there are two aspects to FAIRsharing's data that make it difficult to use:
While there's nothing wrong with JWT, it requires several steps that make
programmatic access inconvenient for less seasoned programmers.
The fairsharing_client
package provides a way to automatically bulk download
all contents from the API and store them locally in a reproducible way, so you
can write code that relies on FAIRsharing data without having to worry about how
to interact with its API nor redistribute its data yourself. Further,
this package does some preprocessing on the content to make it more useful.
import fairsharing_client as fc
# Download the data and return the path of the YAML file
# This takes about 4 minutes and gets around 4K records.
path = fc.ensure_fairsharing()
# Download the data and open it for use
data = fc.load_fairsharing()
# Get data for a given record
chebi_record = data["FAIRsharing.62qk8w"]
There are a few ways to do authentication:
FAIRSHARING_LOGIN
and FAIRSHARING_PASSWORD
envionrment variables~/.config/fairshairing.ini
file, add the
following configuration:
[fairsharing]
login = cthoyt@gmail.com
password = ...
login
and password
keywords to either of
the example functions.A reminder: this repository does NOT redistribute FAIRsharing's data, it only provides code for you to get it yourself.
The most recent release can be installed from PyPI with:
$ pip install fairsharing_client
The most recent code and data can be installed directly from GitHub with:
$ pip install git+https://github.com/cthoyt/fairsharing-client.git
Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See CONTRIBUTING.md for more information on getting involved.
The code in this package is licensed under the MIT License.
This package was created with @audreyfeldroy's cookiecutter package using @cthoyt's cookiecutter-snekpack template.
The final section of the README is for if you want to get involved by making a code contribution.
To install in development mode, use the following:
$ git clone git+https://github.com/cthoyt/fairsharing-client.git
$ cd fairsharing-client
$ pip install -e .
After cloning the repository and installing tox
with pip install tox
, the
unit tests in the tests/
folder can be run reproducibly with:
$ tox
Additionally, these tests are automatically re-run with each commit in a GitHub Action .
The documentation can be built locally using the following:
$ git clone git+https://github.com/cthoyt/fairsharing-client.git
$ cd fairsharing-client
$ tox -e docs
$ open docs/build/html/index.html
The documentation automatically installs the package as well as the docs
extra specified in the setup.cfg
. sphinx
plugins like texext
can be added there. Additionally, they need to be added to the
extensions
list in docs/source/conf.py
.
After installing the package in development mode and installing
tox
with pip install tox
, the commands for making a new release are
contained within the finish
environment in tox.ini
. Run the following from
the shell:
$ tox -e finish
This script does the following:
setup.cfg
,
src/fairsharing_client/version.py
,
and docs/source/conf.py
to not have the -dev
suffixbuild
twine
. Be sure to
have a .pypirc
file configured to avoid the need for manual input at this
steptox -e bumpversion minor
after.FAQs
A client to the FAIRsharing API
We found that fairsharing-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.