Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

aDict dictionary format handling

Project description

aDict provides interface to reading and writing aDict dictionary format. Typical usage:

from adict import *                # data classes
from adict.parser import Parser    # text to data
from adict.printer import Printer  # data to text

with open('some file') as f:
    a = Article('Python')
    a.classes.append('n')
    a.transcriptions.append('Л€paЙЄОёЙ™n')
    d1 = Definition('a kind of programming language')
    d2 = Definition('a kind of Snake')
    d2.links.append('hyperonym', 'Snake')
    a.content = [d1, d2]

    dictionary = Parser(f).parse()
    dictionary.articles.append(a)

with open('some other file', 'w') as f:
    f.write(str(Printer(dictionary)))

aDict format specification

…in English has not written yet. :)

However, I think, this format is pretty simple to understand by trial and error or by looking on this implementation.

Contributors

Only me = arseniiv so far.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aDict2, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size aDict2-0.1.1.zip (14.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page