Skip to main content

A library for your daily data engineering and data science routines.

Project description

Welcome to alphalib

A library for your daily data engineering and data science routines.

This file will become your README and also the index of your documentation.

Install

`pip install alphalib

How to use

Ingest from Excel to accounts table in PostgreSQL

# Ingest from Excel to `accounts` table in PostgreSQL
excel_source = file_sources.get(FileSource.Excel, file_path="data/accounts.xlsx")
config = {
    'host': 'localhost',
    'port': 5432,
    'db': 'testdb',
    'user': 'user1',
    'password': 'userpwd'
}
pgsql_target = db_targets.get(DatabaseTarget.PostgreSQL, **config)
ingest(excel_source, pgsql_target, 'accounts')
2020-12-12 21:26:59,943 INFO(): {'user_id': INTEGER(), 'username': VARCHAR(length=50), 'password': VARCHAR(length=50), 'email': VARCHAR(length=255), 'created_on': TIMESTAMP(), 'last_login': TIMESTAMP()}



Total records in data/accounts.xlsx - 100
user_id - 100
username - 100
password - 100
email - 100
created_on - 1
last_login - 1

Ingest from CSV to accounts table in MySQL

# Ingest from CSV to `accounts` table in MySQL
csv_source = file_sources.get(FileSource.CSV, file_path="data/accounts.csv")
config = {
    'host': 'localhost',
    'port': 3306,
    'db': 'testdb',
    'user': 'user1',
    'password': 'userpwd'
}
mysql_target = db_targets.get(DatabaseTarget.MySQL, **config)
ingest(csv_source, mysql_target, 'accounts')
2020-12-12 21:35:29,017 INFO(): {'user_id': INTEGER(), 'username': VARCHAR(length=50), 'password': VARCHAR(length=50), 'email': VARCHAR(length=255), 'created_on': TIMESTAMP(), 'last_login': TIMESTAMP()}



Total records in data/accounts.csv - 100
user_id - 100
username - 100
password - 100
email - 100
created_on - 1
last_login - 1

Project details


Download files

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

Source Distribution

alphalib-0.0.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

alphalib-0.0.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file alphalib-0.0.1.tar.gz.

File metadata

  • Download URL: alphalib-0.0.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for alphalib-0.0.1.tar.gz
Algorithm Hash digest
SHA256 33314e81189ac2e0caedc2b743460e974a90eefddf99a7773c86bf700d2192fc
MD5 5baf807d0035afae65726a5cddd479f5
BLAKE2b-256 2ce6da5d1fde0a6ea75cc0801beb4736cd405377474b4dedab48409cdc36db87

See more details on using hashes here.

File details

Details for the file alphalib-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: alphalib-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for alphalib-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e7d063fe5c3b6974fb9018dea9a79d96d7c0c8fed80d060000f6745adccdbc7
MD5 dafa5780609f912f7dc0368fd554f323
BLAKE2b-256 590639feb7d70f63c0a6958b3d78c11701c97451c9381fa0f183b5f6abbd5d0e

See more details on using hashes here.

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