A python client for the pubtrack REST api
Free software: MIT license
Documentation: https://pypubtrack.readthedocs.io.
Table of Contents
Overview
pypubtrack is a python client interface for the PubTrack web applications. PubTrack is a web application, which can be installed on a web server and which provides a web UI for tracking the scientific publications of a workgroup or a whole institute by defining a list of observed authors. All publications published by any one of these observed authors will be imported into the PubTrack database and a Status will be assigned based on the attributes of this publication and a set of rules of how these attributes are supposed to look like.
The PubTrack web app is implemented as a REST API for the backend and a VueJS single page application as the frontend. As it exposes a REST API, there are vast options for this client interface to interact with the application…
Obtaining an API Token
Visit the admin backend of the pubtrack site you are attempting to connect with. Navigate to the section “Tokens” and create a new one. Use this token in your code to generate properly authenticated requests.
First Steps
Installation
pypubtrack is a pure python library and can be simply installed using pip:
$ pip3 install --user pypubtrack
To use the CLI commands properly it is recommended to add the folder of local binary executables to the system PATH:
$ echo 'export PATH=~/.local/bin/:$PATH' >> ~/.bashrc
$ source ~/.bashrc
Alternatively it can also be installed by cloning this repository from github and executing the setup manually:
$ git clone https://github.com/the16thpythonist/pypubtrack.git
$ cd pypubtrack
$ python3 setup.py install
Basic Usage
from pypubtrack import Pubtrack
from pypubtrack.config import Config
# Getting a new instance of the config singleton
config = Config().load_dict({
'basic': {'url': 'https://pubtrack.com/api/v1'},
'auth': {'token': 'MY SUPER SECRET TOKEN'}
})
# Creating the main access object
pubtrack = Pubtrack(config)
try:
publications = pubtrack.publication.get()['results']
for publication in publications:
print(publication)
except ConnectionError:
print('Something went wrong!')
Basic CLI Usage
If the package was properly installed, the pypubtrack command should be available from the terminal. For further information use ‘–help’ option.
$ pypubtrack --help
To create an installation folder and a local configuration file use the init command. The config file can be edited with the config command. It will open in your favorite editor.
$ pypubtrack init
$ pypubtrack config
To import scopus publications to your pubtrack app, use the import-scopus command. To update existing publication records on pubtrack with kitopen information, use the update-kitopen command.
$ pypubtrack import-scopus --verbose --start=2018
$ pypubtrack update-kitopen --verbose --start=2018
(!) NOTE
To use the pypubtrack application, the config file needs to be initialized and needs to contain valid information about the pubtrack URL, authentication token, scopus api key etc…
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Metadata
Release files for pypubtrack 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pypubtrack-0.3.0.tar.gz | 28.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypubtrack-0.3.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 50.4 kB
Release files / pypubtrack-0.3.0.tar.gz
| Download URL | pypubtrack-0.3.0.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b389a28140f201b4027fba0ea86cbccbbc739a7f3db23b574ded0c8ad84838f1
|
|
BLAKE2b-256 checksum How to use checksums |
c02e01dd78a1b5e52e7fd7447adebe6ad0f1249352125467d81f9a5c33f955da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Release files / pypubtrack-0.3.0-py2.py3-none-any.whl
| Download URL | pypubtrack-0.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
808b092cd14ed85abb8db24eb271b84c53b0954331a938da5f4e9d635e3e5c61
|
|
BLAKE2b-256 checksum How to use checksums |
27e23432e6ab6c67cbaf1708c5f27e354bdd2f771faf9b20768bb696c3ff7ac8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Security for pypubtrack 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.