Fast way to create Access Database
Project description
Why I created this package ?
- One by one insertion into Access DB, But it takes too much time to insert 100k records,
cursor.execute("INSERT STATEMENT")
cursor.commit()
- Bulk way insertion into Access DB and it is fast if you compare with above one, But even it is very slow from https://github.com/mkleehammer/pyodbc/issues/120
cursor.executemany("Bulk INSERT STATEMENT")
cursor.commit()
But think if you want to insert 1000k records into AccessDB, how much time you have to wait?
What the package will do ?
- Imports the data from text file to Access Database.
- Creating Access Database from pandas dataframe very quickly.
- Primary Key support.
- Can create many tables in Access Database
- Data Types support
How to Use:
- If you have pandas dataframe you can follow bellow example
import accessdb
# your dataframe
# df.to_accessdb(<DB_PATH>, <TABLE_NAME>)
df.to_accessdb(r'C:\Users\<user>\Desktop\test.accdb', 'SAMPLE')
- If you have text file you can follow bellow example
from accessdb import create_accessdb
# create_accessdb(<DB_PATH>, <TEXT_FILE_PATH>, <TABLE_NAME>)
create_accessdb(r'C:\Users\<user>\Desktop\test.accdb', r'C:\Users\<user>\Documents\test.text', 'SAMPLE')
Installation:
pip install accessdb
Note:
- It will create text file if you are using pandas dataframe to create Access Database, But the file will be deleted after completion of process.
- It supports only for Windows.
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
accessdb-0.0.1.tar.gz
(11.3 kB
view hashes)
Built Distribution
Close
Hashes for accessdb-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bca16f424c79fcb7887e7793ae80434e55ab0cad2b16885af9febc5a3b4712f3 |
|
MD5 | 9e842d16e5733d1caf1040897ef0d8b2 |
|
BLAKE2b-256 | 9531bf118b8d2c47d92a99d9d94e615a7dec1c37d44f0bf83cd6c53bdc48aea9 |