TODO: Archive on GitHub and only maintain here? (currently out of sync) https://github.com/voc/c3tt_rpc_client
  • Python 95.1%
  • Shell 4.9%
Find a file
2023-08-06 14:34:46 +02:00
example add example and setup.py for library 2023-08-06 13:50:31 +02:00
src dist tooling 2023-08-06 14:23:50 +02:00
.gitignore add example and setup.py for library 2023-08-06 13:50:31 +02:00
build_dist.sh document publishing 2023-08-06 14:34:46 +02:00
clean.sh dist tooling 2023-08-06 14:23:50 +02:00
LICENSE move code from voc/voctopublish#htmlupload to its own repo 2023-08-06 13:42:34 +02:00
lint.sh dist tooling 2023-08-06 14:23:50 +02:00
README.md document publishing 2023-08-06 14:34:46 +02:00
requirements.txt dist tooling 2023-08-06 14:23:50 +02:00
setup.py dist tooling 2023-08-06 14:23:50 +02:00
upload_dist.sh dist tooling 2023-08-06 14:23:50 +02:00

Python Client Library for C3-Ticket-Tracker

Client-Library for C3-Ticket-Tracker. Get it from PyPi

Example

Get the next Encoding-Ticket, work on it and set it Done:

import os
import socket

from src.c3tt_rpc_client import C3TTClient

cli = C3TTClient(os.environ['CRS_TRACKER'], os.environ['CRS_TOKEN'], socket.gethostname(), os.environ['CRS_SECRET'])
ticket = cli.assign_next_unassigned_for_state(ticket_type='encoding', to_state='encoding')
if ticket is None:
    print('No Ticket for encoding')
else:
    print('Got Ticket for encoding:')
    print(ticket)

    print('Set Ticket done')
    cli.set_ticket_done(ticket)

Deploying

To Deploy a new Version to pypi, run ./upload_dist.sh. This will

  • Clean previous Build-Results
  • Setup a venv
  • Install build/dist Tooling (built, twine, flake8)
  • Lint the Code
  • Create whl and tar.gz artifacts
  • Upload them to pypi