An abstraction of data source for extraction applications usage
Project description
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.
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
sour-cereal-1.0.4.tar.gz
(5.0 kB
view details)
File details
Details for the file sour-cereal-1.0.4.tar.gz
.
File metadata
- Download URL: sour-cereal-1.0.4.tar.gz
- Upload date:
- Size: 5.0 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.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e532d0eb2b1ccd78740d9f90d886438e476855dd4a5e4d56bea1e4d25dd1c114 |
|
MD5 | 8c6bd0c229d98aee8a96c08db91e3468 |
|
BLAKE2b-256 | ba03153e1ae3dad6b254de6302b467bce094b4dd35775a10411d7acf60f1e8e5 |