Skip to main content

Python library to transform objects into positional flat string lines

Project description

pyflat

The pyflat package aims to provide easy serialization of Python objects into positional fixed-width strings. These kind of structures are useful when integrating with old system which depends on positional flat files.

Quick Start

Instalation

To install Pyflat, use pip or pipenv:

$ pip install pyflat

Example Usage

from pyflat import Base, Field, RJUST

class User(Base):
    name = Field(size=20)
    income = Field(size=10, sep='0', justify=RJUST)


user = User()
user.name = 'John Doe'
user.income = 4500.35


print(user) # => John Doe            0000450035

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

pyflat-0.1.0.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

pyflat-0.1.0-py3-none-any.whl (2.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