nacha文件生成

nacha3的Python项目详细描述


纳卡

https://travis-ci.org/DisruptiveLabs/nacha.pnghttps://coveralls.io/repos/DisruptiveLabs/nacha/badge.png?branch=master

NACHA是固定大小的 用于表示如下组成的金融交易的记录格式:

FileHeader
    CompanyBatchHeader
        EntryDetail
            EntryDetailAddendum
            ...
        ...
    CompanyBatchControl
    ...
FileControl

我们用bryl来表达。写作是 这样做:

withopen('sample.nacha','w')asfo:writer=nacha.Writer(fo)withwriter.begin_file(...):withwriter.begin_company_batch(...):writer.entry(...):......

读取是通过重复这样的记录来完成的:

withopen('sample.nacha','r')asfo:reader=Reader(fo,include_terminal=True)forrecord,terminalinreader:...

或类似这样的结构:

withopen('sample.nacha','r')asfo:reader=Reader(fo)reader.file_header()forcompany_batch_headerinreader.company_batches():forentry_detail,entry_addendainreader.entries():...reader.company_batch_control()reader.file_control()

使用

$ pip install nacha3

开发

$ git clone https://github.com/rockxraj68/nacha3.git
$ cd nacha
$ mkvirtualenv nacha
(nacha)$ pip install -e .[tests](nacha)$ py.test tests.py --cov=nacha --cov-report term-missing

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
多线程如何在读取文本文件时使用Java进度条?   ChromeDriver出现“java.lang.module.InvalidModuleDescriptorException:提供程序类org.apache.bsf.BSFManager不在模块中”错误   java如何将Google日历链接到应用程序?   java线程信令序列   java StackOverflowerr不知道出了什么问题   从azure mobile apps easy tables获取表格时,java Android应用程序冻结   java Android应用程序无法连接到firebase数据库   java如何将属性文件中的值注入字段?   无法创建java Spring引导CXF XMLOutputFactory   javaui:月份选择器   获取java数组中n个最大值的索引   java注入servlet调度器中的EntityManagerFactory(非托管)   我在Android Studio中编写java代码,需要从特定网页获取并显示特定行的数据   java如何在Hibernate中设置内部查询的限制?   java如何编写接受一个数组和两个整数的交换方法   基于递归的java快速供电方法