Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

CAVaccineInventory/vaccine-feed-ingest-schema

Repository files navigation

vaccine-feed-ingest-schema

PyPI Changelog License

Normalized data schema for the output of the vaccine-feed-ingest pipeline.

Installation

Install this library using pip:

pip install vaccine-feed-ingest-schema

Usage

Import this package then use it to construct normalized objects with type enforcement.

from vaccine_feed_ingest_schema import location


location.NormalizedLocation(
  id="vaccinebot:uuid-for-site",
  source=location.Source(
    source="vaccinebot",
    id="uuid-for-site",
    fetched_from_uri="https://vaccinateTheStates.com",
    published_at="2021-01-13T00:00:00-08:00",
    data={},
  )
)

For more details on the schema, read the inline comments or the vaccine-feed-ingest wiki.

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd vaccine-feed-ingest-schema
python -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies, linters, and tests:

pip install -e '.[lint,test]'

To run code formatters:

isort .
black .

To run linters:

mypy .
flake8 vaccine_feed_ingest_schema

To run the tests:

pytest