dum-0.4
توضیحات
Direct data to object for xml, jon and csv
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | dum-0.4 |
| نام | dum |
| نسخه کتابخانه | 0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Sébastien Keim |
| ایمیل نویسنده | s.keim@free.fr |
| آدرس صفحه اصلی | https://bitbucket.org/sebkeim/dum |
| آدرس اینترنتی | https://pypi.org/project/dum/ |
| مجوز | MIT |
############
Introduction
############
With the dum module you can easily map data from structured files
to a set of python classes.
The current version can be used with json, csv or xlm formats,
more are expected to come.
Parsing and projecting
======================
The main idea is that your code is designed with objects that share more or less the same
organization than the data in the original file. With a few directives, it must then be possible
to directly project the data parsed from the file to the class model of your application.
For sample a minimal (all the display methods are still to write...) `Atom <https://en.wikipedia.org/wiki/Atom_%28standard%29>`_ application
could look like
::
class Author:
class dum:
name =""
email=""
class Link:
class dum:
rel=""
href=""
class Entry:
class dum:
title = ""
author = [Author]
link = [Link]
updated = dateutil.parser.parse
class Atom:
class dum:
title =""
subtitle= ""
entry = [Entry]
link = [Link]
updated = dateutil.parser.parse
atom = dum.xml(Atom, open("myrss"))
Requirements
============
The library has been tested for Python 3.4
There is no external dependencies.
نحوه نصب
نصب پکیج whl dum-0.4:
pip install dum-0.4.whl
نصب پکیج tar.gz dum-0.4:
pip install dum-0.4.tar.gz