Skip to main content

sour-cereal

About

An abstraction of connections to real data sources for extraction applications usage.

It implements simple methods for extraction preparation, monitoring, execution and cleaning into a class, meant to be inherited.

The goal of this project consists in creating a standardized API for communicating with data sources in applications written in Python.

Installing

You can simply install it using pip as follows:

$ pip install sour-cereal

Usage

from sour_cereal import SourceConnection

class FooDataSource(SourceConnection):
    def get_status_of_extraction(self: 'FooDataSource', *args, **kwargs):
        return datetime.now()

    def check_availability_of_extraction(self: 'FooDataSource', status: datetime):
        return status.hour >= 7		# data is ready only after 7pm

    def execute_extraction(self: 'FooDataSource', *args, **kwargs):
		# Extract some data
        return ['file1', 'file2']

For more examples, please check the files inside the sour_cereal/examples folder.

Download files

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

Source Distribution

sour-cereal-1.0.9.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file sour-cereal-1.0.9.tar.gz.

File metadata

  • Download URL: sour-cereal-1.0.9.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5

File hashes

Hashes for sour-cereal-1.0.9.tar.gz
Algorithm Hash digest
SHA256 a8dcaa28f34701f1efed12b27218c516b2d0eefd7644cd726b820a400d44c349
MD5 ddea9fd27dc9c670265dfc4865560ce8
BLAKE2b-256 2aaf8f172530fe60f6e3f82c9ec69ccbbfe3197b0c4ea9a62fb759fdb9a0df46

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.9 This release

1 file

1.0.8

1 file

1.0.7

1 file

1.0.6

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page