Skip to main content

Python tool for importing and validating data from xlsx/xls/csv files.

Project description

import me

Build Status Maintainability Test Coverage PyPI version PyPI - Python Version

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:

Project details


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 details)

Uploaded Source

Built Distribution

import_me-0.2.4-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file import_me-0.2.4.tar.gz.

File metadata

  • Download URL: import_me-0.2.4.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for import_me-0.2.4.tar.gz
Algorithm Hash digest
SHA256 0cf48aaa7d955de2708716cb34b12ea7d5b556e4d900c6137b2df75dc2070d72
MD5 0afbc0c6cd8168ca39b15a293670e33d
BLAKE2b-256 c084c68b51c1a2c6ef43399bb53972c43de16c0eed97a9fa94cc4d30b0a6ed8a

See more details on using hashes here.

File details

Details for the file import_me-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: import_me-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for import_me-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 230505ca53335e7a78562ba19c48fe2f9a19a6df71d2cdd1772e88d55c402d6f
MD5 2da659503ea63e3658888db1b6e8a837
BLAKE2b-256 686d4efd71096ab5b722ee9cd08c0cf2811f5f45c47c4a960b69f87bcc513b39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page