Skip to content

ioxio-dataspace/example-productizer

 
 

Repository files navigation

Example Productizer for IOXIO Dataspace™️

Ruff Pre-commit License: BSD 3-Clause

Implementation of a basic Productizer for random weather data using Python and FastAPI. Serves as an example of how to implement a working Productizer.

Do not use this codebase in production or with production data without careful understanding and consideration of the security and other consequences. This codebase is not suitable as-is for sensitive data.

Development

Generic pre-requisites for development

To set up the pre-commit hooks, run pre-commit install in the repo. After it you can manually run pre-commit only for your changes or pre-commit run --all-files for all files.

Running

Local

Install dependencies:

poetry install

Then to run the application, use:

poetry run invoke dev

Docker

Make sure Docker is installed.

docker build -t example-productizer .
docker run -p 8000:8000 --rm -it example-productizer

Example API query

curl -X POST -H "Content-Type: application/json" -d '{"lat":60.192059, "lon":24.945831}' http://localhost:8000/Weather/Current/Metric_v1.0

Docs

The API serves its own docs, if running as instructed above, can be found at http://localhost:8000/docs, and the OpenAPI 3.0 spec can be found at http://localhost:8000/openapi.json.

License

This code is released under the BSD 3-Clause license. Details in the LICENSE.md file.

Guides and help

Written guide for how to build a data source

You can also check out our YouTube tutorial:

Defining Data Products for the IOXIO® Dataspace technology

Also join our IOXIO Community Slack

About

Example implementation of a Productizer

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.8%
  • Shell 8.0%
  • Dockerfile 3.7%
  • JavaScript 1.5%