The Alphacruncher python library
Project description
aclib - The alphacruncher python library
Installation
$ pip install aclib
Usage
The library provides 2 convenience functions for connecting to the remote database with your credentials. It assumes that you have a credential file ~/.odbc.ini in the following format
[nuvolos] uid = <username> pwd = <password>
The library will also look for a special /lifecycle/.dbpath file. When used inside an Alphacruncher application, this file is populated by the platfrom with the db and schema name of the application, and the library will pick these up automatically.
You can then get the SQLAlchemy connection string, or create an SQLAlchemy engine directly:
>>> from aclib import get_url, get_engine >>> get_url() 'snowflake://<username>:<password>@alphacruncher.eu-central-1/?warehouse=<username>' >>> get_url("db_name","schema_name") 'snowflake://<username>:<password>@alphacruncher.eu-central-1/?warehouse=<username>&database=db_name&schema=schema_name' >>> eng = get_engine("db_name","schema_name")
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
aclib-0.2.4.tar.gz
(2.5 kB
view details)
File details
Details for the file aclib-0.2.4.tar.gz
.
File metadata
- Download URL: aclib-0.2.4.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c8c9d279c485e419ceb7a9e41ddeeb94d4cc54b2ce9f9c466032130d2442d42 |
|
MD5 | ee896e3480dbe71c6c6a4135e0731bba |
|
BLAKE2b-256 | 008cfb2776b5febcfb2bb3a5815a68ccdcd16e0980a868004ca2dc7e57007223 |