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
pip install lcs_client
- Create virtual environment locally
OR
virtualenv -p python3 env
python3 -m venv env
- Activate the virtual environment
source env/bin/activate
- Install the required dependencies (prod and dev) into the virtual environment
pip install -e .[dev]
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
Run the following command from terminal:
pytest
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
pip install -r example_requirements.txt
python example_api.py
Pre-requisites:
- [Perform Development setup](#Development setup)
- Ensure version changes are appropriately reflected using semantic versioning in
lcs_client/__init__.py
andsetup.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
- Install wheel to build and twine to upload package
pip install -e .[build]
- Build the source archive and wheel for package
python setup.py sdist bdist_wheel
- Examine the archive to ensure it includes the expected files
- Check for common errors
twine check dist/*
- Upload to TestPyPi and ensure correctness
If it errors out about not having permissions to upload, simply change the name within setup.py and restart from step 2
twine upload --repository testpypi dist/*
- Upload the new release
twine upload dist/*