MT940格式解析器
您能否推荐任何适用于 Python 的操作系统、现成的、文档齐全且尚未失效的 MT940 格式解析器?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
您能否推荐任何适用于 Python 的操作系统、现成的、文档齐全且尚未失效的 MT940 格式解析器?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
可能有点晚了,但我不久前已经用 Python 编写了一个支持 MT940 的库。我刚刚对其进行了一次大更新,使其更加通用,因此它应该适合大多数人:https: //github.com/WoLpH/mt940
如果有任何问题,请告诉我。 Pull 请求总是受欢迎的:)
目前它支持读取我能找到的任何 Mt940 文件(我有 31 个文件的测试集),并且根据格式,它将解析或多或少的信息。
要为您的文件添加特定支持,可以使用预处理器和后处理器支持来添加一些自定义解析:http://mt940.readthedocs.org/en/latest/mt940.html#mt940.models.Transactions
一些银行在交易详细信息中包含额外信息,使用此方法可以轻松支持这些信息。
文档可以在 readthedocs 上找到: http://mt940.readthedocs.org/en/latest/ mt940.html
该软件包可通过 Pypi 安装:https://pypi.python.org /pypi/mt-940
用法示例:
Possibly a little late to the party, but I've written a library to support MT940 with Python some time ago. I've just given it a large update to be a bit more versatile so it should do the trick for most people: https://github.com/WoLpH/mt940
If there are any problems, please let me know. Pull requests are always welcome :)
Currently it supports reading any Mt940 file I could find (I have a testset of 31 files) and depending on the format it will parse more or less information.
To add specific support for your files there is pre- and post-processor support to add some custom parsing: http://mt940.readthedocs.org/en/latest/mt940.html#mt940.models.Transactions
Some banks have extra information in the transaction details which is easily supportable using this method.
Documentation can be found on readthedocs: http://mt940.readthedocs.org/en/latest/mt940.html
The package is installable through Pypi: https://pypi.python.org/pypi/mt-940
Example usage:
我只设法找到这个python项目: https://github.com/headcr4sh/django-banking
也许您可以出于自己的目的扩展/更新上述项目。该代码非常容易阅读。
如果您不介意使用 Java,有一个最新项目可以轻松解析/创建任何 swift 消息:
http ://sourceforge.net/projects/wife/
代码示例:
创建:https://github.com/prowide/prowide-core-examples/blob/master/src/com/prowidesoftware/swift/samples/MessageCreationExample.java
解析: https ://github.com/prowide/prowide-core-examples/blob/master/src/com/prowidesoftware/swift/samples/ParseMT940Example.java
他们的网站:http://www.prowidesoftware.com/core.jsp
I only manage to find this python project: https://github.com/headcr4sh/django-banking
Maybe you can extend/update the above project for your own purpose. The code is quite easy to read.
If you don't mind using Java, there's one up to date project that could parse/create any swift message easily:
http://sourceforge.net/projects/wife/
Code sample:
creation: https://github.com/prowide/prowide-core-examples/blob/master/src/com/prowidesoftware/swift/samples/MessageCreationExample.java
parsing: https://github.com/prowide/prowide-core-examples/blob/master/src/com/prowidesoftware/swift/samples/ParseMT940Example.java
their website: http://www.prowidesoftware.com/core.jsp