Python tool for importing and validating data from xlsx/xls/csv files.
Project description
import me
Python tool for importing and validating data from xlsx/xls/csv files.
Example
from import_me import BaseXLSXParser, Column
from import_me.processors import StringProcessor, IntegerProcessor
>>> class XLSXParser(BaseXLSXParser):
... columns = [
... Column('first_name', index=0, header='First Name', processor=StringProcessor()),
... Column('last_name', index=1, header='Last Name', processor=StringProcessor()),
... Column('age', index=2, header='Age', processor=IntegerProcessor()),
... ]
>>> parser = XLSXParser(file_path=xlsx_filepath)
>>> parser()
>>> print(parser.has_errors) # False
>>> pprint(parser.cleaned_data)
[
{
'first_name': 'Ivan',
'last_name': 'Ivanov',
'age': 25,
'row_index': 1,
},
{
'first_name': 'Petr',
'last_name': 'Petrov',
'age': 33,
'row_index': 2,
},
]
Installation
pip install import_me
Contributing
We would love you to contribute to our project. It's simple:
- Create an issue with bug you found or proposal you have. Wait for approve from maintainer.
- Create a pull request. Make sure all checks are green.
- Fix review comments if any.
- Be awesome.
Here are useful tips:
- You can run all checks and tests with
make check
. Please do it before TravisCI does. - We use BestDoctor python styleguide.
- We respect Django CoC. Make soft, not bullshit.
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
import_me-0.2.4.tar.gz
(20.0 kB
view hashes)
Built Distribution
import_me-0.2.4-py3-none-any.whl
(23.5 kB
view hashes)
Close
Hashes for import_me-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 230505ca53335e7a78562ba19c48fe2f9a19a6df71d2cdd1772e88d55c402d6f |
|
MD5 | 2da659503ea63e3658888db1b6e8a837 |
|
BLAKE2b-256 | 686d4efd71096ab5b722ee9cd08c0cf2811f5f45c47c4a960b69f87bcc513b39 |