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.2.tar.gz
(11.8 kB
view details)
Built Distribution
import_me-0.2.2-py3-none-any.whl
(12.3 kB
view details)
File details
Details for the file import_me-0.2.2.tar.gz
.
File metadata
- Download URL: import_me-0.2.2.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
bc8c8f5ed1b022c3ea65f9d0cd1bf693fe1e2f3ed7ea4729685691883dd3ce0a
|
|
MD5 |
5739d5e23cf781961733dd16c094c468
|
|
BLAKE2b-256 |
4471f54fed3b54db931fd30aa18b54a1fd7b0b4307a37875fb4c0c12af434320
|
File details
Details for the file import_me-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: import_me-0.2.2-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
90a3a393ab221b1f4cadf9781e511a16a0914ddbbb1c73100b9271e8299020c2
|
|
MD5 |
f4d04b5a551cedea352ac3079c31cefa
|
|
BLAKE2b-256 |
d5326eda3d6ec0ffde398d472a03fd63f8820dab3e4812217aea0cbf3f6de41a
|