Skip to content

izidorome/pyflat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, RIGHT

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


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


user.dump() # => John Doe            0000450035

About

Positional fixed-width strings in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages