Client tools for accessing various client APIs of IT4I portals
Project description
List of available utilities
it4ifree - Show some basic information from IT4I PBS accounting.
motd_rss - A generic tool for extracting JSON feed(s) into formatted text or HTML page (using TAL / Zope Page Template).
Installation / upgrading
pip install --upgrade it4i.portal.clients
Sample config file main.cfg
[main]
# IT4I API
api_url = https://scs.it4i.cz/api/v1/
it4ifreetoken = <your_token>
Username is taken from OS, therefore the script has to be run under the same user login name as you use to log into clusters.
System-wide config file path: /usr/local/etc/it4i-portal-clients/main.cfg
Local user’s config file path: ~/.it4ifree
it4ifree
help of IT4IFREE
$ it4ifree -h
usage: it4ifree [-h] [-p]
The command shows some basic information from IT4I PBS accounting. The
data is related to the current user and to all projects in which user
participates.
optional arguments:
-h, --help show this help message and exit
-p, --percent show values in percentage. Projects with unlimited resources are not displayed
Columns of "Projects I am participating in":
PID: Project ID/account string.
Days left: Days till the given project expires.
Total: Core-hours allocated to the given project.
Used: Sum of core-hours used by all project members.
...by me: Core-hours used by the current user only.
Free: Core-hours that haven't yet been utilized.
Columns of "Projects I am Primarily Investigating" (if present):
PID: Project ID/account string.
Login: Project member's login name.
Used: Project member's used core-hours.
Example of IT4IFREE
$ it4ifree
Projects I am participating in
==============================
PID Days left Total Used WCHs Used NCHs WCHs by me NCHs by me Free
---------- ----------- ------- ----------- ----------- ------------ ------------ -------
OPEN-XX-XX 323 0 5169947 5169947 50001 50001 1292555
Projects I am Primarily Investigating
=====================================
PID Login Used WCHs Used NCHs
---------- ---------- ----------- -----------
OPEN-XX-XX user1 376670 376670
user2 4793277 4793277
Legend
======
WCH = Wall-clock Core Hour
NCH = Normalized Core Hour
motd_rss
help of MOTD
$ motd_rss --help
usage: motd_rss -h|--help
motd_rss [OPTION] ... -t|--text FEED_SOURCE ...
motd_rss [OPTION] ... -t|--text -i [FEED_SOURCE ...]
motd_rss [OPTION] ... -m <page_template>|--html=<page_template> FEED_SOURCE ...
motd_rss [OPTION] ... -m <page_template>|--html=<page_template> -i [FEED_SOURCE ...]
FEED SOURCE
o some URL
e.g. http://example.com/atom.xml
o some file
e.g. /path/to/a/file.xml
o raw XML data
OPTIONS
-i, --stdin
Read additional feed source from stdin
-l <number>, --limit=<number>
Limit number of feeds (after merge)
-n, --cron
Sleep from 10 up to 60 seconds prior to any actions
-r, --reverse
Reverse order of feeds (newest at top)
-s <sort_key>, --sort=<sort_key>
Sort using one of these sort keys: content, published, updated, title
Defaults to: updated
-v, --verbose
Be verbose
-w <number>, --width=<number>
Maximum line width (intended for text rendering, default of 78 columns)
Example of MOTD
$ motd_rss -l5 -t https://scs.it4i.cz/api/v1/motd/all
Message of the Day (DD/MM/YYYY)
(YYYY-MM-DD hh:mm:ss)
More on https://...
Changelog
0.7.4 (2019-03-05)
Other
Add option to show values in percentage for it4ifree. [Marek Chrastina]
Replace argument parser library in it4ifree. [Marek Chrastina]
New api url in config. [Marek Chrastina]
0.7.3 (2019-03-04)
Other
Update documentation. [Marek Chrastina]
Fix help bug. [Marek Chrastina]
0.7.2 (2019-03-01)
Other
Update documentation. [Marek Chrastina]
Do not allow CI failure. [Marek Chrastina]
Fix pylint complaints. [Marek Chrastina]
Install required pip packages before run pylint. [Marek Chrastina]
Fix pylint complaints. [Marek Chrastina]
Fix shellcheck complaints. [Marek Chrastina]
Change automatic upload to manual. [Marek Chrastina]
0.7.1 (2019-02-28)
Other
Exclude merge commits from changelog. [Marek Chrastina]
Add CI deploy. [Marek Chrastina]
Add CI pylint. [Marek Chrastina]
Add CI shellcheck. [Marek Chrastina]
Fix mdl complaints. [Marek Chrastina]
Add CI mdcheck. [Marek Chrastina]
0.6.7 (2017-09-08)
Other
Core hour => core-hour. [David Hrbáč]
Standard CH => Normalized CH. [David Hrbáč]
0.6.6 (2017-09-08)
Other
Code lint. [David Hrbáč]
Clean-up unused imports. [David Hrbáč]
0.6.5 (2017-09-05)
Other
Core Hours to Wall-clock Core Hours; Fixes it4i-admins/it4i-portal-clients#4. [David Hrbáč]
0.6.4 (2017-09-05)
Other
Core Hours to Wall-clock Core Hours; Fixes it4i-admins/it4i-portal-clients#4. [David Hrbáč]
0.6.3 (2017-08-08)
Other
Beutify format. [Jan Krupa]
Fixed Standart -> Standard. [Jan Krupa]
Fixed labels. [kru0096]
Display normalized core hours. [kru0096]
0.6.2 (2017-07-25)
Other
Use the JSON for HTML render. [David Hrbáč]
0.6.1 (2017-07-25)
Other
Use the JSON. [David Hrbáč]
0.5.12 (2017-07-25)
Other
Require dateutil. [David Hrbáč]
0.5.11 (2017-07-25)
Other
Use 24 hours. [David Hrbáč]
0.5.10 (2017-07-25)
Other
Use the JSON. [David Hrbáč]
0.5.9 (2017-07-21)
Other
Release 0.5.9. [David Hrbáč]
Typo. [David Hrbáč]
0.5.8 (2017-07-21)
Other
Move to HTTPS channel. [David Hrbáč]
Convert it4ifree to SCS, motd deprecated. [David Hrbáč]
0.5.7 (2017-02-06)
Other
Handle long titles. [David Hrbáč]
0.5.6 (2017-02-03)
Other
Corrections to README. [David Hrbáč]
Test commit. [Jan Krupa]
0.5.5 (2017-02-02)
Other
Enable to display timerange for events. [David Hrbáč]
0.5.2 (2016-10-10)
Other
Format text. [Jan Krupa]
0.5.1 (2016-10-10)
Other
Pypandoc version pinned. [Filip Valder]
0.5 (2016-10-10)
Other
License changed. [Jan Krupa]
0.4.9 (2016-06-24)
Other
A helpful script for testing installs. [Filip Valder]
0.4.8 (2016-06-24)
Other
A more advanced solution for setup.py. [Filip Valder]
Without the dot. [Filip Valder]
A more advanced solution for setup.py. [Filip Valder]
0.4.7 (2016-06-24)
Other
Handle KeyError: ‘IT4I_FACTORY_PREBUILD’ [Filip Valder]
0.4.6 (2016-06-24)
Other
Setup_requires depends on the evironment: IT4I factory versus end-user. [Filip Valder]
0.4.5 (2016-06-24)
Other
Get python interpreter from the environment. [Filip Valder]
0.4.4 (2016-06-24)
Other
Setup deps. [Filip Valder]
0.4.3 (2016-06-24)
Other
Some ignores added. [Filip Valder]
0.4.2 (2016-06-23)
Other
The other way round. [Filip Valder]
Exclude git-related stuff from MANIFEST.in. [Filip Valder]
Additional requirements for setup. [Filip Valder]
Some gitchangelog rc file. [Filip Valder]
Mising comma. [Filip Valder]
Auto-versioning accto git tags. [Filip Valder]
See the hint in it4ifree.py. [Filip Valder]
White space. [Filip Valder]
Instructions re-ordered. [Filip Valder]
0.4.1 (2016-06-01)
Other
Keywords added. [Filip Valder]
Important functional improvements & introduced README. [Filip Valder]
0.4 (2016-06-01)
Other
Config module introduced. [Filip Valder]
Sample config file. [Filip Valder]
README.txt -> README.md due to GL (the change will also appear in setup.py) [Filip Valder]
Init & use module name ; not filename. [Filip Valder]
Get ready for 0.4 release. [Filip Valder]
Use module name ; not filename. [Filip Valder]
Bug fixes. [Filip Valder]
Support for sorting. [Filip Valder]
Support for published date/time. [Filip Valder]
CStringIO for full module usage support. [Filip Valder]
0.3.4 (2016-05-19)
Other
Support for stdin and various feed sources. [Filip Valder]
Logging goes to separate file. [Filip Valder]
Write to stderr instead of stdout. [Filip Valder]
Egg-info for 0.3.3.post2. [Filip Valder]
Repository moved, project IT4I-ized… [Filip Valder]
0.3.3.post1 released: setuptools is already dep of PIP, it may mess things up during install. [Filip Valder]
0.3.3 (2016-02-25)
Other
Egg-info files for 0.3.3. [Filip Valder]
0.3.3 released. [Filip Valder]
Support for verbose and width opts; short opt for cron changed. [Filip Valder]
Default template fixes. [Filip Valder]
Sync with MANIFEST.in. [Filip Valder]
Remove dist from repository. [Filip Valder]
0.3.2 stable with unicode encoding fixed. [Filip Valder]
Add README. [Filip Valder]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for it4i.portal.clients-0.7.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8462aa945e536c6d8461524d59eeba52ebc0aceb844ece8c1d6ce35550b78a38 |
|
MD5 | 88e376b9aca8aa7180e778002f8139d6 |
|
BLAKE2b-256 | 25ab9de335f43f488464ed843eca0ac50e8654196fccaf78320fb07c361fc069 |