Reference¶
pybman.client module¶
pybman.data module¶
-
class
pybman.data.
DataSet
(data_id, data=None, raw=None)¶ Bases:
object
-
get_cone_persons
()¶ extract persons’ CoNE IDs and associated names
-
get_contexts
()¶ extract IDs of records an associated IDs of collection
-
get_creators
()¶ extract data of creators from records
-
get_creators_data
()¶ extract persons’ CoNE IDs and associated records
-
get_creators_from_records
()¶ extract creators lists from records
-
get_genre_data
()¶ extract genres and associated records
-
get_genre_relationships
()¶ extract genres and associated source genres
-
get_genres
()¶ extract genres and associated IDs of records
-
get_item
(item_id)¶ extract record with given record ID
-
get_items_from_year
(year)¶ extract IDs of records with given publication year
-
get_items_from_year_data
(year)¶ extract records with given publication year
-
get_items_released
()¶ extract IDs of records with state ‘released’ and associated records
-
get_items_submitted
()¶ extract records with state ‘submitted’ and associated IDs
-
get_items_with_external_url
()¶ extract records with external url
-
get_items_with_genre
(genre)¶ extract IDs of records with state ‘released’ and associated records
-
get_items_with_identifier_uri
()¶ extract records with identifier uri
-
get_items_with_source_genre
(source_genre)¶ extract records with given source genre
-
get_journals
()¶ extract publication sources from records with JOURNAL as source genre
-
get_journals_data
()¶ extract records with JOURNAL as source genre
-
get_languages
()¶ extract publication languages and associated record IDs
-
get_languages_data
()¶ extract publication languages and associated records
-
get_organizations
()¶ extract organizations of creators and associated IDs of records
-
get_places
()¶ extract publication places and associated IDs of records
-
get_publishers
()¶ extract publishers and associated IDs of records
-
get_series
()¶ extract publication source from records with SERIES as source genre
-
get_source_from_items_with_source_genre
(source_genre)¶ extract data of record’s source with given source genre
-
get_source_genres
()¶ extract genres of publication sources and associated record IDs
-
get_source_genres_data
()¶ extract genres of publication sources and associated records
-
get_sources_identifiers
()¶ extract identifers of publication sources and associated record IDs
-
get_sources_titles
()¶ extract titles of publication sources and associated record IDs
-
get_titles
()¶ extract titles and associated IDs of records
-
get_titles_from_source
()¶ extract titles of sources and associated IDs of records
-
get_years
()¶ extract publication years and associated record IDs
-
get_years_data
()¶ extract publication years and associated records
-
pybman.extract module¶
data extraction routines
-
pybman.extract.
creators_from_item
(item)¶ extract creators of item
-
pybman.extract.
creators_from_source
(source)¶ extract sources’ titles and genres from item
-
pybman.extract.
ctx_from_item
(item)¶ extract identifier of item
-
pybman.extract.
ctx_idx_from_item
(item)¶ extract identifier of item
-
pybman.extract.
data
(item)¶ extract data of item
-
pybman.extract.
date_accepted_from_item
(item)¶ extract date of acceptance from item
-
pybman.extract.
date_created_from_item
(item)¶ extract date of creation from item
-
pybman.extract.
date_from_item
(item)¶ extract date from item
-
pybman.extract.
date_modified_from_item
(item)¶ extract date of modification from item
-
pybman.extract.
date_pubonline_from_item
(item)¶ extract publication date (online) from item
-
pybman.extract.
date_pubprint_from_item
(item)¶ extract publication date (print) from item
-
pybman.extract.
date_submitted_from_item
(item)¶ extract date of submission from item
-
pybman.extract.
field_from_creator
(field, creator)¶ extract field from creator of item
-
pybman.extract.
field_from_metadata
(field, item, value=True)¶ extract field from metadata of item
-
pybman.extract.
field_from_pubinfo
(field, item)¶ extract field from publishing info of item
-
pybman.extract.
field_in_level
(field, level)¶ true if field is in level, false otherwise
-
pybman.extract.
genre_from_item
(item)¶ extract genre of item
-
pybman.extract.
identifers_from_item
(item)¶ extract values and types of identifiers
-
pybman.extract.
idx_from_item
(item)¶ extract identifier of item
-
pybman.extract.
items
(records)¶ iterate items
-
pybman.extract.
iter_fields
(field, level)¶ iterate over field of level
-
pybman.extract.
languages_from_item
(item)¶ extract languages of item
-
pybman.extract.
list_from_level
(field, level)¶ extract list from field in level of item
-
pybman.extract.
metadata
(item)¶ extract meta data of item
-
pybman.extract.
organizations_from_item
(item)¶ extract organizations from item
-
pybman.extract.
organizations_identifier_from_creator
(creator)¶ extract organizations’ identifiers from item
-
pybman.extract.
organizations_name_from_creator
(creator)¶ extract organizations’ names from item
-
pybman.extract.
persons_affiliation_from_creator
(creator)¶ exract persons’ affiliations from creator of item
-
pybman.extract.
persons_from_item
(item)¶ extract persons from item
-
pybman.extract.
persons_id_from_creator
(creator)¶ exract persons’ ID and type of ID from creator of item
-
pybman.extract.
persons_identifier_from_creator
(creator)¶ exract persons’ identifier from creator of item
-
pybman.extract.
persons_name_from_creator
(creator)¶ exract persons’ name from creator of item
-
pybman.extract.
persons_organizations_from_creator
(creator)¶ exract persons’ organizations from creator of item
-
pybman.extract.
place_from_item
(item)¶ extract publishing place of item
-
pybman.extract.
pubinfo_from_item
(item)¶ extract publishing info of item
-
pybman.extract.
publisher_from_item
(item)¶ extract publisher from item
-
pybman.extract.
role_from_creator
(creator)¶ extract role from creator of item
-
pybman.extract.
source_titles
(collection)¶ extract source titles from records
-
pybman.extract.
source_titles_genres
(collection)¶ extract source titles and genres from records
-
pybman.extract.
sources
(item)¶ iterate over sources of item
-
pybman.extract.
sources_identifiers_from_item
(item)¶ extract values and types of identifiers from item’s sources
-
pybman.extract.
sources_persons_affiliations_from_item
(item)¶ extract persons affilations from source of item
-
pybman.extract.
sources_persons_from_item
(item)¶ extract sources’ creators from item if person
-
pybman.extract.
sources_persons_id_from_item
(item)¶ extract persons ID from source of item
-
pybman.extract.
sources_titles_from_item
(item)¶ extract sources’ titles from item
-
pybman.extract.
sources_titles_genres_from_item
(item)¶ extract sources’ titles and genres from item
-
pybman.extract.
title_from_item
(item)¶ extract title of item
-
pybman.extract.
titles_from_records
(records)¶ extract titles from records
-
pybman.extract.
type_from_creator
(creator)¶ extract type of creator
-
pybman.extract.
value_from_level
(field, level)¶ extract value from field in level of item
pybman.inspector module¶
-
class
pybman.inspector.
Inspector
(client, records)¶ Bases:
object
-
change_genre
(new_genre, old_genre)¶
-
change_pers_name
(old_family_name=None, new_family_name=None, old_given_name=None, new_given_name=None)¶
-
change_source_genre
(new_genre, old_genre)¶
-
check_publication_date
()¶
-
check_publication_titles
(clean=False)¶
-
check_publication_uri
()¶
-
check_publication_url
()¶
-
check_publishers
(clean=False)¶
-
check_publishers_omission
(clean=False)¶
-
check_publishing_places
(clean=False)¶
-
check_publishing_places_omission
(clean=False)¶
-
check_source_titles
(clean=False)¶
-
clean_publishers
()¶
-
clean_publishing_places
()¶
-
clean_source_titles
()¶
-
clean_titles
()¶
-
update_genre
(new_genre, old_genre)¶
-
update_source_genre
(new_genre, old_genre)¶
-
pybman.local module¶
pybman.query module¶
-
class
pybman.query.
ConeQuery
¶ Bases:
object
-
class
pybman.query.
ContextQuery
¶ Bases:
object
-
get_item_query
(ctx_id)¶
-
get_released_item_query
(ctx_id)¶
-
-
class
pybman.query.
JournalQuery
¶ Bases:
object
-
get_item_query
(jour_name)¶
-
get_released_item_query
(jour_name)¶
-
-
class
pybman.query.
LangQuery
¶ Bases:
object
-
get_item_query
(lang_id)¶
-
get_released_item_query
(lang_id)¶
-
-
class
pybman.query.
OrgUnitQuery
¶ Bases:
object
-
get_item_query
(ou_id)¶
-
get_item_released_query
(ou_id)¶
-
-
class
pybman.query.
PersQuery
¶ Bases:
object
-
get_item_query
(cone_id)¶
-
get_item_released_query
(cone_id)¶
-
-
class
pybman.query.
Query
¶ Bases:
object
pybman.rest module¶
-
class
pybman.rest.
BaseController
(url='https://pure.mpg.de/')¶ Bases:
object
-
class
pybman.rest.
ConeController
¶ Bases:
pybman.rest.BaseController
-
class
pybman.rest.
ContextRestController
¶ Bases:
pybman.rest.RestController
-
get
(ctx_id='ctx_924547')¶
-
get_all
()¶
-
-
class
pybman.rest.
FeedRestController
¶ Bases:
pybman.rest.RestController
-
get_recent_oa
()¶
-
get_recent_releases
()¶
-
get_recent_releases_for_ou
()¶
-
get_search_as_feed
()¶
-
-
class
pybman.rest.
ItemRestController
(secret='')¶ Bases:
pybman.rest.LoginRestController
-
count_items
(query=None)¶
-
release_item
(item_id, data, comment)¶
-
revise_item
()¶
-
scroll_items
(scroll_id, counter)¶
-
search_items
(query=None)¶
-
submit_item
()¶
-
update_item
(item_id, data)¶
-
withdraw_item
()¶
-
-
class
pybman.rest.
JournalConeController
¶ Bases:
pybman.rest.ConeController
-
get_entities
()¶
-
get_entity
(journal_id='954928372938')¶
-
search_entity
(cone_id)¶
-
-
class
pybman.rest.
LanguageConeController
¶ Bases:
pybman.rest.ConeController
-
full_init
()¶
-
get_entities
()¶
-
get_entity
(language_id='deu')¶
-
init
()¶
-
search_entity
(cone_id)¶
-
-
class
pybman.rest.
LoginRestController
(auth=True, cred='')¶ Bases:
pybman.rest.RestController
-
get_user
()¶
-
login
()¶
-
logout
()¶
-
-
class
pybman.rest.
OrgUnitRestController
¶ Bases:
pybman.rest.RestController
-
child_organizations
(ou_id='ou_907574')¶
-
get
(ou_id='ou_907574')¶
-
get_all
()¶
-
top_level
()¶
-
-
class
pybman.rest.
PersonConeController
¶ Bases:
pybman.rest.ConeController
-
full_init
()¶
-
get_entities
()¶
-
get_entity
(person_id='persons32341')¶
-
init
()¶
-
ous_graph
()¶
-
search_entity
(cone_id)¶
-
-
class
pybman.rest.
RestController
¶ Bases:
pybman.rest.BaseController
-
get_docs
()¶ retrieve api docs of rest interface
-
pybman.utils module¶
-
pybman.utils.
add_value
(d, dkey='', dvalue='')¶
-
pybman.utils.
check_url
(url)¶
-
pybman.utils.
clean_string
(string)¶
-
pybman.utils.
get_request
(url, params=None, headers=None, json_response=True)¶
-
pybman.utils.
post_request
(url, params=None, headers=None, data=None, json_res=True)¶
-
pybman.utils.
put_request
(url, header, data)¶
-
pybman.utils.
read_csv_with_header
(path)¶
-
pybman.utils.
read_json
(path)¶
-
pybman.utils.
read_plain_clean
(path)¶
-
pybman.utils.
resolve_path
(path)¶
-
pybman.utils.
url_exists
(url)¶
-
pybman.utils.
url_exists2
(url)¶
-
pybman.utils.
write_csv
(path, results)¶
-
pybman.utils.
write_json
(path, data)¶
-
pybman.utils.
write_list
(path, results)¶