Skip to main content

DraCor API Wrapper

Project description

pydracor-base

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

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

It was created using the following command:

docker run --rm -v "$PWD:/local" openapitools/openapi-generator-cli generate \
                                                                             -i https://dracor.org/api/v1/openapi.yaml \
                                                                             -g python \
                                                                             -o /local/dracor_api_wrapper \
                                                                             -t /local/custom_templates \
                                                                             -p packageName=pydracor_base

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.0.tar.gz (50.0 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.0-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydracor_base-1.0.0.tar.gz
  • Upload date:
  • Size: 50.0 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.0.tar.gz
Algorithm Hash digest
SHA256 af129913396f4c7bb5927771a3d8154178174cab57f24f742a954ca269b15833
MD5 b8d6039c03173998b84e24c375f218aa
BLAKE2b-256 cb53c1cd33ee016be5e48d81544b38ae3b3c2d127a36680d976df284c2ad5097

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydracor_base-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 79.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44385c3455d0ecaa2d67150d2638a7d9c756dc2593445d5c388a32ebbf452fca
MD5 e365bf7ca8032ca47764b44da8f5c432
BLAKE2b-256 a0a85b43685c874fa8f2b82c144fde4d0e7ea55ab1725da1ffe5894e5a617441

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