Skip to main content

Client for interacting with LCS, the HackRU backend

Project description

python-lcs-client

A client for server side Python applications to interact with LCS, the HackRU backend. The general idea is for this to be used with a JSON based web API. For every request to your API, you would ask for a LCS token.

Alternatively you could have your own tokens, and have the user pass in the password again but this will be annoying for the user if they already logged into the HackRU frontend

Documentation

Installation

pip install lcs_client

Development setup

  1. Create virtual environment locally
    virtualenv -p python3 env
    
    OR
    python3 -m venv env
    
  2. Activate the virtual environment
    source env/bin/activate
    
  3. Install the required dependencies (prod and dev) into the virtual environment
    pip install -e .[dev]
    
Installing lcs_client (after making local code changes)

Run the following in terminal:

pip install -e .

This will install the package as if you installed it from PyPi so that you can perform testing using the package rather than the local file

Running tests

Run the following command from terminal:

pytest

Generating documentation

Pre-requisite:

  • [Perform Development setup](#Development setup)

Run the following from terminal (which will use the configuration within pdoc-markdown.yml):

pydoc-markdown

The generated documentation is within lcs_client.md
Edit the README.md as required according to the changes made

Running the example web application

pip install -r example_requirements.txt
python example_api.py

Release on PyPi

Pre-requisites:

  • [Perform Development setup](#Development setup)
  • Ensure version changes are appropriately reflected using semantic versioning in lcs_client/__init__.py and setup.py (as well as any other source files)
  • Ensure documentation is up to date by following the steps within [Generating documentation](#Generating documentation)
  • Ensure code has been committed to the GitHub repo with a tag and commit message that include the version number
  1. Install wheel to build and twine to upload package
    pip install -e .[build]
    
  2. Build the source archive and wheel for package
    python setup.py sdist bdist_wheel
    
  3. Examine the archive to ensure it includes the expected files
  4. Check for common errors
    twine check dist/*
    
  5. Upload to TestPyPi and ensure correctness
    twine upload --repository testpypi dist/*
    
    If it errors out about not having permissions to upload, simply change the name within setup.py and restart from step 2
  6. Upload the new release
    twine upload dist/*
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lcs_client-2.0.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lcs_client-2.0.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file lcs_client-2.0.0.tar.gz.

File metadata

  • Download URL: lcs_client-2.0.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

File hashes

Hashes for lcs_client-2.0.0.tar.gz
Algorithm Hash digest
SHA256 0a353b00acd7e0516b6d96be80306a17e02398895cbe202a643e123f6dec5010
MD5 0f0e04c2b0a60f629fe0558eac7d01aa
BLAKE2b-256 d9d99362e4bb55e7fe6dd335eb975d1482b71fa40d3c3962d5983e34d4be29b3

See more details on using hashes here.

File details

Details for the file lcs_client-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: lcs_client-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

File hashes

Hashes for lcs_client-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27cea52af245cc6863d282b1bad53fca8fe6eb4b5edec400839fc4627b07c797
MD5 e5b5878d17d6cbcae0ce9cbae81fd96b
BLAKE2b-256 a385f4215fa5e44cc5dd9b7ccd8104ce9ff3602bb92fd66fbe33ebaa6b06b289

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page