Skip to main content

Standard and idiosyncratic schemata for Sanskrit data, with a library of validation, (de-)serialization, a database interface and other utilities.

Project description

Alert: PIP documentation could be badly formatted due to this pypan bug , please see https://github.com/sanskrit-coders/sanskrit_data/blob/master/README.md in the meantime.

Introduction

This module defines:

  • schema

    • shared standard schema for communicating and storing Sanskrit data of various types.

    • various idiosyncratic notations used by various modules which deviate from the proposed standards.

  • python classes (corresponding to the schema) and shared libraries for validating, (de-)serializing and storing sanskrit data of various types.

  • a common database interface for accessing various databases (so that a downstream app can switch to a different database with a single line change).

Similar libraries in various other languages are being built:

Motivation

  • Various sanskrit modules need to communicate data amongst each other (for example through a REST API or database stores or even function calls). Examples of the data being communicated could be:

    • Gramatical details of a given word

    • Sentences in a given book chapter

    • Annotations on a given phrase

  • When it comes to serialization formats - two distinct approaches present themselves to us:

    • One possible route is to have each project defining and using its own idiosyncratic notation. But this entails an additional burdens:

      • Each communicating module having to convert the data from one idiosyncratic notation to another.

      • Good schema design or notation is non trivial. Even if no external module is using the data, it is a waste to have to reinvent the wheel.

    • A superior route is to have a common, standard format for encoding various data-types for storage/ communication.

  • To the extant possible, we should take latter approach to data storage and communication.

  • Where idiosyncratic notations are adapted for various reasons, it is still desirable to collect such definitions in a single module - to facilitate conversion to the standard format.

For users

Installation

  • Install this library

    • Latest release: sudo pip2 install sanskrit_data -U

    • Development copy: sudo pip2 install git+https://github.com/sanskrit-coders/sanskrit_data@master -U

    • Web.

  • Install libraries for the particular database you want to access through the sanskrit_data.db interface (as needed): pymongo, cloudant (for couchdb).

Usage

  • Please see the generated python sphynx docs in one of the following places:

  • Design considerations for data containers corresponding to the various submodules (such as books and annotations) are given below - or in the corresponding source files.

For contributors

Contact

Have a problem or question? Please head to github.

Packaging

  • ~/.pypirc should have your pypi login credentials.

    python setup.py bdist_wheel
    twine upload dist/* --skip-existing

Document generation

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sanskrit_data-0.3.4-py2.py3-none-any.whl (22.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sanskrit_data-0.3.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sanskrit_data-0.3.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 77e0a64930178cf8150d65af26efa78a6bc5209b4e837517d7803e6666329b7c
MD5 71a5c8f585116d0606197b093bf90b6b
BLAKE2b-256 3c75a29bfa77dd7ec51df3895ad3030ec137a4f40bb91956767af93de45c2342

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page