Skip to main content

A Python module for making HTTP requests to Online Linguistic Database (OLD) instances.

Project description

This package is a client module for OLD web services. It facilitates making HTTP requests to interact with one or more OLD instances.


$ pip install oldclient

For example usage, see the src/ file. In summary:

>>> from oldclient import OLDClient
>>> options = {
...     'url': '<URL_TO_AN_OLD_INSTANCE>',
...     'username': '<YOUR_USERNAME>',
...     'password': '<YOUR_PASSWORD>'}
>>> old_client = OLDClient(options['url'])
>>> old_client.login(options['username'], options['password'])
>>> form = old_client.models['form'].copy()
>>> form['transcription'] = 'Arma virumque cano.'
>>> form['translations'].append({
...     'transcription': 'I sing of arms and a man.',
...     'grammaticality': ''})
>>> response = old_client.create(
...     'forms',
...     data=form)
>>> print(response['id'])

The src/ file will create a stock form on an OLD you specify and have access to:

$ python src/ \
      -u <YOUR_USERNAME> \
      -p <YOUR_PASSWORD>
John Doe created a new form with id 1059 on 2018-11-20T07:05:58.

If you are logged in to your OLD instance in Dative, you should be able to see the form just created (the first three words from Virgil’s Aeneid) at the above URL.

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 oldclient, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size oldclient-0.0.1.tar.gz (5.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page