Skip to main content

Utilities for easier development of extractors for CDF

Project description

Cognite logo

Cognite Python extractor-utils

Build Status Documentation Status codecov PyPI version PyPI - Python Version License Code style: black

The extractor-utils package is an extension of the Cognite Python SDK intended to simplify the development of data extractors or other integrations for Cognite Data Fusion.

Documentation is hosted here, including a quickstart tutorial.

The changelog is found here.

Overview

The best way to start a new extractor project is to use the cogex CLI. You can install that from PyPI:

pip install cognite-extractor-manager

To initialize a new extractor project, run

cogex init

in the directory you want your extractor project in. The cogex CLI will prompt you for some information about your project, and then set up a poetry environment, git repository, commit hooks with type and style checks and load a template.

Extensions

Some source systems have a lot in common, such as RESTful APIs or systems exposing as MQTT. We therefore have extensions to extractor-utils tailroed to these protocols. These can be found in separate packages:

Contributing

The package is open source under the Apache 2.0 license, and contribtuions are welcome.

This project adheres to the Contributor Covenant v2.0 as a code of conduct.

Development environment

We use poetry to manage dependencies and to administrate virtual environments. To develop extractor-utils, follow the following steps to set up your local environment:

  1. Install poetry if you haven't already.

  2. Clone repository:

    $ git clone git@github.com:cognitedata/python-extractor-utils.git
    
  3. Move into the newly created local repository:

    $ cd python-extractor-utils
    
  4. Create virtual environment and install dependencies:

    $ poetry install
    

Code requirements

All code must pass black and isort style checks to be merged. It is recommended to install pre-commit hooks to ensure this locally before commiting code:

$ poetry run pre-commit install

Each public method, class and module should have docstrings. Docstrings are written in the Google style. Please include unit and/or integration tests for submitted code, and remember to update the changelog.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cognite_extractor_utils-7.1.2.tar.gz (49.3 kB view hashes)

Uploaded Source

Built Distribution

cognite_extractor_utils-7.1.2-py3-none-any.whl (68.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page