Skip to main content

hydrus Build Status

hydrus is a set of Python based tools for easier and efficient creation of Hypermedia driven REST-APIs. hydrus utilises the power of Linked Data to create a powerful REST APIs to serve data. hydrus uses the Hydra(W3C) standard for creation and documentation of it's APIs.

Start-up the demo

  • with Docker and docker-compose installed, run docker-compose up --build
  • open the browser at http://localhost:8080/api/vocab

You should be displaying the example API as served by the server.

Add your own Hydra documentation file

To serve your own Hydra-RDF documentation file:

  • create a doc.py file as the ones in examples/ directory containing your own ApiDoc
  • set the APIDOC_REL_PATH variable in docker-compose.yml. This should the relative path from the project root
  • start-up the demo as above.

You should be displaying your API as served by the server.

Table of contents

Features

hydrus supports the following features:

  • A client that can understand Hydra vocabulary and interacts with a Hydra supporting server to basic CRUD operations on data.
  • A generic server that can serve required data and metadata(in the form of API documentation) to a client over HTTP.
  • A middleware that allows users to use the client to interact with the server using Natural Language which is processed machine consumable language. (under development)

Requirements

The system is built over the following standards and tools:

  • Flask a Python based micro-framework for handling server requests and responses.
  • JSON-LD as the preferred data format.
  • Hydra as the API standard.
  • SQLAlchemy as the backend database connector for storage and related operations.

Apart from this, there are also various Python packages that hydrus uses. Using python setup.py install installs all the required dependencies.

NOTE: You'll need to use python3 not python2. Hydrus does not support python < 3.6

Demo

To run a demo for hydrus using the sample API, just do the following:

  1. Clone hydrus:
git clone https://github.com/HTTP-APIs/hydrus
cd hydrus
  1. Install a Python virtual environment using:
python3.7 -m venv .venv

or:

virtualenv -p python3.7 .venv
  1. Install hydrus using:
source .venv/bin/activate
pip install -r requirements.txt
python setup.py install

NOTE: there is an alternative way to install dependencies with poetry:

pip3 install poetry
poetry install

This is mostly used to check dependencies conflicts among packages and to release to PyPi.

After installation is successful, to run the server:

hydrus serve

The demo should be up and running on http://localhost:8080/serverapi/.

Usage

For more info, head to the Usage section of the wiki.

Development

From the hydrus directory:

  • To run formatter: pip install black && black *.py
  • To test for formatting: flake8 *.py

Metadata

Release files for hydrus 0.4.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hydrus 0.4.7
File Size Uploaded
hydrus-0.4.7.tar.gz 48.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hydrus 0.4.7
File Interpreter ABI Platform
hydrus-0.4.7-py3-none-any.whl Python 3 none any Details

Total release size: 104.2 kB

Release files / hydrus-0.4.7.tar.gz

Download URL hydrus-0.4.7.tar.gz
Size 48.1 kB
Tags Source
SHA-256 checksum
How to use checksums
86f750ee892c612c486d0d618a7ceca1af653923f7fe4878470498eda665d50c
BLAKE2b-256 checksum
How to use checksums
6b4b01fe3373536f54b4637f5c9d752c84352b962e89a5f7d9316d28d0f632fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / hydrus-0.4.7-py3-none-any.whl

Download URL hydrus-0.4.7-py3-none-any.whl
Size 56.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cadecebb2a79aae8f9a029140871aca4362f1dcfb15cf1f29281b5516b010003
BLAKE2b-256 checksum
How to use checksums
9dbc897de4468b5309acc33bddd687a597387d6125504fdd7011062aab8fdf3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.4.7 This release

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.3.1

1 release file

0.3.0

1 release file

0.2.5

1 release file

0.2.4

2 release files

0.2.3

1 release file

0.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page