Skip to main content

DraCor API

Project description

pydracor-base

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.1.4
  • Package version: 1.0.1
  • Generator version: 7.11.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

The models and the command used to build this package are saved in the following repository: https://github.com/dracor-org/pydracor-base-generator.

Requirements.

Python 3.8+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/dracor-org/pydracor-base.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/dracor-org/pydracor-base.git)

Then import the package:

import pydracor_base

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import pydracor_base

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import pydracor_base
from pydracor_base.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://dracor.org/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pydracor_base.Configuration(
    host = "https://dracor.org/api/v1"
)



# Enter a context with an instance of the API client
with pydracor_base.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pydracor_base.DTSApi(api_client)

    try:
        # Distributed Text Services API Entrypoint
        api_response = api_instance.dts_entrypoint()
        print("The response of DTSApi->dts_entrypoint:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DTSApi->dts_entrypoint: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://dracor.org/api/v1

Class Method HTTP request Description
DTSApi dts_entrypoint GET /dts Distributed Text Services API Entrypoint
DTSApi get_dts_collection GET /dts/collection DTS Collection
DTSApi get_dts_document GET /dts/document DTS Document endpoint
DTSApi get_dts_navigation GET /dts/navigation Navigation
AdminApi delete_corpus DELETE /corpora/{corpusname} Remove corpus from database
AdminApi load_corpus POST /corpora/{corpusname} Load corpus data from its repository
AdminApi play_delete DELETE /corpora/{corpusname}/plays/{playname} Remove a single play from the corpus
AdminApi play_tei_put PUT /corpora/{corpusname}/plays/{playname}/tei Add new or update existing TEI document
AdminApi post_corpora POST /corpora Add new corpus
PublicApi api_info GET /info API info
PublicApi corpus_metadata GET /corpora/{corpusname}/metadata List of metadata for all plays in a corpus
PublicApi corpus_metadata_csv_endpoint GET /corpora/{corpusname}/metadata/csv List of metadata for all plays in a corpus
PublicApi get_characters GET /corpora/{corpusname}/plays/{playname}/characters Get a list of characters of a play
PublicApi get_characters_csv GET /corpora/{corpusname}/plays/{playname}/characters/csv Get a list of characters of a play (CSV)
PublicApi list_corpora GET /corpora List available corpora
PublicApi list_corpus_content GET /corpora/{corpusname} List corpus content
PublicApi network_csv GET /corpora/{corpusname}/plays/{playname}/networkdata/csv Get network data of a play as CSV
PublicApi network_gexf GET /corpora/{corpusname}/plays/{playname}/networkdata/gexf Get network data of a play as GEXF
PublicApi network_graphml GET /corpora/{corpusname}/plays/{playname}/networkdata/graphml Get network data of a play as GraphML
PublicApi play_info GET /corpora/{corpusname}/plays/{playname} Get metadata and network metrics for a single play
PublicApi play_metrics GET /corpora/{corpusname}/plays/{playname}/metrics Get network metrics for a single play
PublicApi play_spoken_text GET /corpora/{corpusname}/plays/{playname}/spoken-text Get spoken text of a play (excluding stage directions)
PublicApi play_spoken_text_by_character GET /corpora/{corpusname}/plays/{playname}/spoken-text-by-character Get spoken text for each character of a play
PublicApi play_stage_directions GET /corpora/{corpusname}/plays/{playname}/stage-directions Get all stage directions of a play
PublicApi play_stage_directions_with_speakers GET /corpora/{corpusname}/plays/{playname}/stage-directions-with-speakers Get all stage directions of a play including speakers
PublicApi play_tei GET /corpora/{corpusname}/plays/{playname}/tei Get TEI document of a single play
PublicApi play_txt GET /corpora/{corpusname}/plays/{playname}/txt Get plain text of a single play
PublicApi plays_with_character GET /character/{id} List plays having a character identified by Wikidata ID
PublicApi relations_csv GET /corpora/{corpusname}/plays/{playname}/relations/csv Get relation data of a play as CSV
PublicApi relations_gexf GET /corpora/{corpusname}/plays/{playname}/relations/gexf Get relation data of a play as GEXF
PublicApi relations_graphml GET /corpora/{corpusname}/plays/{playname}/relations/graphml Get relation data of a play as GraphML
PublicApi resolve_id GET /id/{id} Resolve DraCor play ID
WebhookApi github_webhook POST /webhook/github GitHub Webhook
WikidataApi wikidata_author_info GET /wikidata/author/{id} List author information from Wikidata
WikidataApi wikidata_mixnmatch GET /wikidata/mixnmatch Endpoint for Wikidata Mix'n'match

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Project details


Download files

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

Source Distribution

pydracor_base-1.0.1.tar.gz (49.7 kB view details)

Uploaded Source

Built Distribution

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

pydracor_base-1.0.1-py3-none-any.whl (78.3 kB view details)

Uploaded Python 3

File details

Details for the file pydracor_base-1.0.1.tar.gz.

File metadata

  • Download URL: pydracor_base-1.0.1.tar.gz
  • Upload date:
  • Size: 49.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for pydracor_base-1.0.1.tar.gz
Algorithm Hash digest
SHA256 12216ef45eb2b595d3877ab622e59aa24e9d2f2926e973c8a50d116901c84ca0
MD5 cba8d9f18f9e8d8ae538809ddd5cf911
BLAKE2b-256 326a19a2e975505b6115c13145bc8085782a16c6e28705ffbedcd4a0aacb51a5

See more details on using hashes here.

File details

Details for the file pydracor_base-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pydracor_base-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 78.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for pydracor_base-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 debdadf3890cac3b710842fcf26166f974c7628da56130e229fe732af7dbd809
MD5 6cf393b570e4be28c932fdbef00f7a03
BLAKE2b-256 a4555f1755779f039b2f5ee4bf5d7a72e666ba03070dbc9d6a26eabb9457074d

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