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
- AuthorInPlayInCorpus
- AuthorInPlayMetadata
- Character
- CharacterInPlayMetadata
- Corpus
- CorpusInCorpora
- CorpusMetrics
- DtsEntrypoint
- ExternalReferenceResourceId
- Info
- LoadCorpusRequest
- NodeInPlayMetrics
- Play
- PlayInCorpus
- PlayMetadata
- PlayMetrics
- PlayWithWikidataCharacter
- PostCorporaRequest
- RelationItemInPlayMetadata
- SegmentItemInPlayMetadata
- SourceInPlayMetadata
- SpokenTextByCharacter
- WikidataAuthorInfo404Response
- WordCounts
Documentation For Authorization
Endpoints do not require authorization.
Metadata
Release files for pydracor-base 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pydracor_base-1.0.1.tar.gz | 49.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydracor_base-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 128.0 kB
Release files / pydracor_base-1.0.1.tar.gz
| Download URL | pydracor_base-1.0.1.tar.gz |
|---|---|
| Size | 49.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12216ef45eb2b595d3877ab622e59aa24e9d2f2926e973c8a50d116901c84ca0
|
|
BLAKE2b-256 checksum How to use checksums |
326a19a2e975505b6115c13145bc8085782a16c6e28705ffbedcd4a0aacb51a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / pydracor_base-1.0.1-py3-none-any.whl
| Download URL | pydracor_base-1.0.1-py3-none-any.whl |
|---|---|
| Size | 78.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
debdadf3890cac3b710842fcf26166f974c7628da56130e229fe732af7dbd809
|
|
BLAKE2b-256 checksum How to use checksums |
a4555f1755779f039b2f5ee4bf5d7a72e666ba03070dbc9d6a26eabb9457074d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|