Skip to main content

Pycargo is a utility to work with loading and exporting data from excel

Project description


Pycargo: Excel loading and exporting helper


.. image:: https://badgen.net/pypi/v/pycargo :target: https://pypi.org/project/pycargo :alt: Latest version

.. image:: https://badgen.net/badge/code%20style/black/000 :target: https://github.com/ambv/black :alt: code style: black

pycargo is a simple to use helper library for exporting and loading data from excel. Its a common requirement in web applications for bulk loading of data. Pycargo hides all the working and gives you easy to use methods for easy exporting of templates and loading data.

.. code-block:: python

from pycargo import fields
from pycargo.spreadsheet import SpreadSheet


class CustomerSpreadSheet(SpreadSheet):
    name = fields.StringField(comment="Customer Name")
    code = fields.IntegerField(required=True, data_key="Code")
    created_on = fields.DateTimeField()


cs = CustomerSpreadSheet()

# Exporting templates
cs.export_template("customer_template.xlsx", only=["name", "code"])

# Bulk loading
dataset = cs.load("customer_template.xlsx")

So with pycargo you can:

  • Export template for loading data
  • Load data from the templates
  • Validate loaded data.

Get It Now

::

$ pip install -U pycargo

Requirements

  • Python >= 3.6

License

MIT licensed. See the bundled LICENSE file for more details.


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

pycargo-2.1.0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

pycargo-2.1.0-py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 3

Supported by

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