Socket
Socket
Sign inDemoInstall

import-me

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-me

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


Maintainers
3

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:

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc