acdh_arche_pyutils package¶
Submodules¶
acdh_arche_pyutils.client module¶
-
class
acdh_arche_pyutils.client.ArcheApiClient(arche_endpoint, out_dir='.')[source]¶ Bases:
objectMain Class to interact with ARCHE-API
-
class
acdh_arche_pyutils.client.ArcheToTripleStore(triple_store, user=None, pw=None, headers={'Content-Type': 'text/turtle;charset=utf-8'}, **kwargs)[source]¶ Bases:
acdh_arche_pyutils.client.ArcheApiClientA class to post ARCHE data to a Triplestore
-
count_triples()[source]¶ counts all existing triples in the triple store
- Returns
The triple count
- Return type
int
-
acdh_arche_pyutils.utils module¶
Some utility functions module.
-
acdh_arche_pyutils.utils.camel_to_snake(s)[source]¶ converts CamelCase string to camel_case taken from https://stackoverflow.com/a/44969381
- Parameters
s (str:) – some string
- Returns
a camel_case string
- Return type
str:
-
acdh_arche_pyutils.utils.create_query_sting(param_dict)[source]¶ turns a dict into a query string
- Parameters
param_dict (dict) – a dictionary
- Returns
a clean query string
- Return type
str
-
acdh_arche_pyutils.utils.id_from_uri(uri)[source]¶ extracts the id from an ARCHE-URL like https://whatever.com/123 -> 123
- Parameters
uri (str) – some ARCHE-URL
- Returns
the actual ID, e.g. 123
- Return type
str:
Module contents¶
Top-level package for acdh-arche-pyutils.