8000 GitHub - targhs/pycargo · GitHub
[go: up one dir, main page]

Skip to content
targhsPublic

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

2 watching

Forks

Latest commit

 

History

62 Commits

Folders and files

Repository files navigation

Pycargo: Excel loading and exporting helper

Latest version 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.

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.

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

0