orm for csv
Project description
csvorm - ORM for CSV
This allows to use the CSV as ORM.
INSTALL
pip install csvorm
HOW TO USE IT
layout define:
from csvorm import (
Model,
Column,
Integer,
Unicode,
DateTime,
)
class TestCSV(Model):
_encoding_ = 'cp932'
id_ = Column(Integer)
name = Column(Unicode)
modified_at = Column(DateTime())
creating csv:
test_csv = TestCSV()
record = test_csv.create()
record.id_ = 1
record.name = u'first'
record.modified_at = datetime.datetime.now()
record = test_csv.create()
record.id_ = 2
record.name = u'second'
record.modified_at = datetime.datetime.now()
test_csv.dump('test.csv')
parse csv:
test_csv = TestCSV()
test_csv.load('test.csv')
export data:
id_,name,modified_at 1,first,2014-03-26-15-05-50 2,second,2014-03-26-15-05-50
Thanks for contributors
TakesxiSximada
kitsunde
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
csvorm-0.1.5.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file csvorm-0.1.5.tar.gz.
File metadata
- Download URL: csvorm-0.1.5.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13c5cbb416f0f8356c10c9a2227d62b5bc37769ae7d8347bdb0a7cb53e2b05ec
|
|
| MD5 |
25e9828e64d784c39cc2ae5014a71e0c
|
|
| BLAKE2b-256 |
8ee7d304e96bf0004e67aeaf29fa6bfae0df4bdbc6160fa0a034c39488e34617
|
File details
Details for the file csvorm-0.1.5-py3-none-any.whl.
File metadata
- Download URL: csvorm-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31d36be2ec31c493dc77220768a6ec4949a641298be5f1da031258bf19c753ac
|
|
| MD5 |
f1f36c44c8ad44a4984fb3075f97c909
|
|
| BLAKE2b-256 |
2c6c7606d8a37db703dfc4ee5fc63d284c59838277e26559f98be4c63bdef36d
|