A single Package for all the database connectivities ( E.g : MySQL, MongoDb, Cassandra)
Project description
database-connect
A single Package for all the database connectivities ( E.g : MySQL, MongoDb, Cassandra)
How to Use
- in jupyter notebook -
!pip install database-connect
- in command prompt -
pip install database-connect
Database Operations
- import database_connect module
import database_connect as connection
Let's Do The Operations
- For MongoDb Operations
import database_connect as connection
#create the parameters
client_url = 'paste_your_mongodb_connection_url' #should be a string
database = 'your_database_name' #should be a string
collection_name = 'your_collection_name' #should be a string
#let's create the mongo object
mongo = connection.mongo_operation(client_url=client_url,
database=database,
collection_name=collection_name)
- For Cassandra Operations
import database_connect as connection
zip_path = 'paste_the_zip_path' #should be a string
client_id = 'paste_the_client_id' #should be a string
client_secret = 'paste_the_client_secret' #should be a string
keyspace = 'paste_the_keyspace name' #should be a string #note: keyspace should be created manually in datastax cassandra. Keyspaces are not allowed to create from backend.
table_name = 'paste_the_table_name'
cassandra = connection.cassandra_operations(zip_path,
client_id,
client_secret,
keyspace,
table_name)
```
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
database_connect-0.1.5.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for database_connect-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9ea33b540a8eb356b3f43d975e95cabfd10b0e82109dad94f32880f4eae0543 |
|
MD5 | a40f53b1cca988849dcc00701aa07c58 |
|
BLAKE2b-256 | 1d4b959bdd9345d88b5e73e0b8deddef0efe5fb8fb747151e1b73c6faa11515f |