Metadata-Version: 2.4
Name: pydracor-base
Version: 1.0.1
Summary: DraCor API
Home-page: https://github.com/dracor-org/pydracor-base
Author: OpenAPI Generator community, Henny Sluyter-Gäthje
Author-email: sluytergaeth@uni-potsdam.de
License: MIT
Keywords: OpenAPI,OpenAPI-Generator,DraCor API,Wrapper
Description-Content-Type: text/markdown
License-File: LICENCE
Requires-Dist: urllib3<3.0.0,>=1.25.3
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# pydracor-base

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) 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](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:

```sh
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:
```python
import pydracor_base
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import pydracor_base
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

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


## Documentation For Models

 - [AuthorInPlayInCorpus](docs/AuthorInPlayInCorpus.md)
 - [AuthorInPlayMetadata](docs/AuthorInPlayMetadata.md)
 - [Character](docs/Character.md)
 - [CharacterInPlayMetadata](docs/CharacterInPlayMetadata.md)
 - [Corpus](docs/Corpus.md)
 - [CorpusInCorpora](docs/CorpusInCorpora.md)
 - [CorpusMetrics](docs/CorpusMetrics.md)
 - [DtsEntrypoint](docs/DtsEntrypoint.md)
 - [ExternalReferenceResourceId](docs/ExternalReferenceResourceId.md)
 - [Info](docs/Info.md)
 - [LoadCorpusRequest](docs/LoadCorpusRequest.md)
 - [NodeInPlayMetrics](docs/NodeInPlayMetrics.md)
 - [Play](docs/Play.md)
 - [PlayInCorpus](docs/PlayInCorpus.md)
 - [PlayMetadata](docs/PlayMetadata.md)
 - [PlayMetrics](docs/PlayMetrics.md)
 - [PlayWithWikidataCharacter](docs/PlayWithWikidataCharacter.md)
 - [PostCorporaRequest](docs/PostCorporaRequest.md)
 - [RelationItemInPlayMetadata](docs/RelationItemInPlayMetadata.md)
 - [SegmentItemInPlayMetadata](docs/SegmentItemInPlayMetadata.md)
 - [SourceInPlayMetadata](docs/SourceInPlayMetadata.md)
 - [SpokenTextByCharacter](docs/SpokenTextByCharacter.md)
 - [WikidataAuthorInfo404Response](docs/WikidataAuthorInfo404Response.md)
 - [WordCounts](docs/WordCounts.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization

Endpoints do not require authorization.



