Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
This project is basically a document generator (Doc As Code) focused on a few targets like invoices, timesheet, resume or documentation.
The initial goal was to avoid using Microsoft Wo@#$ and Ex@#$ to generate these recurrent documents, and to be able to add a little automation (of course we're lazy ^^).
This python module use click
to facilitate cli calls, help is self-explanatory:
kouyierr --help
Usage: kouyierr [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
documentation
invoice
version
We use rich Python module to add some fancy console display as well:
With click
module, we bundled several scope to make life easier
kouyierr documentation
This scope let you generate PDF documentaion file based on markdown document.
kouyierr documentation generate --help
Usage: kouyierr documentation generate [OPTIONS]
Generate a new documentation from Markdown file based on TeX template
Options:
--output-dir TEXT Output directory, default=.
--markdown TEXT Markdown file path to use for documentation [required]
--output-file TEXT Output PDF filename, default=output.pdf
--template TEXT TeX template file path
--help Show this message and exit.
It can be summoned simply like:
cd tests/org_sample
kouyierr documentation generate --markdown README.md --template template.tex
Sample files can be found in this repo in the unittest folder:
Generated file with these sample can also be found in this repo:
kouyierr invoice
This scope let you generate HTML/PDF invoice file based on YAML definition file and Jinja2 template.
kouyierr invoice generate --help
Usage: kouyierr invoice generate [OPTIONS]
Generate a new invoice based on definition file and company template
Options:
--output-dir TEXT Output directory, default=.
--company_config TEXT Company config file [required]
--invoice_config TEXT Invoice config file [required]
--invoice_id TEXT Invoice ID, default=all
--template TEXT Template file path [required]
--help Show this message and exit.
It can be summoned simply like:
kouyierr invoice generate --company_config tests/org_sample/myfancycompany.yml --invoice_config tests/org_sample/nicecustomer.yml --template tests/org_sample/myfancycompany.html.j2 # for bulk mode for all invoices from this client
kouyierr invoice generate --company_config tests/org_sample/myfancycompany.yml --invoice_config tests/org_sample/nicecustomer.yml --template tests/org_sample/myfancycompany.html.j2 --invoice_id 202011_CUS # for specific invoice
Sample files can be found in this repo in the unittest folder:
Generated file with these sample can also be found in this repo:
kouyierr ghproject
This scope let you generate a markdown file with a review of all issues related to a Github project, grouped by column/category.
kouyierr ghproject generate --help
Usage: kouyierr ghproject generate [OPTIONS]
Generate a changelog-lookalike .md file with all Github project issues grouped by category/column
Options:
--output-dir TEXT Output directory, default=.
--user-token TEXT Github personal access token used for authentication, use env_var for security reason [required]
--repo-owner TEXT Github repository owner (user or organization) [required]
--repo-name TEXT Github repository name [required]
--project TEXT Github project name [required]
--help Show this message and exit.
It can be summoned simply like:
kouyierr ghproject generate --user-token $GITHUB_PAT --repo-owner REPO_OWNER_OR_ORG --repo-name REPO_NAME --project MY_GITHUB_PROJECT
Generated sample file can also be found in this repo:
kouyierr resume
TODO
kouyierr timesheet
TODO
# create a virtual env
virtualenv venv
# activate virtual env
source venv/bin/activate
# run test and package
pip3 install .[test] --user --upgrade
pip3 install .\[test\] --user --upgrade # for ZSH users
python3 setup.py test
# install snapshot build
pip3 install . --user --upgrade
After a commit or merge on master circleci deploys kouyierr automatically on pypi
To install the release version from PyPi:
pip3 install kouyierr --upgrade --user
Or you can install local version as well:
git clone git@github.com:vmdude/kouyierr.git && cd kouyierr
pip3 install . --upgrade --user
For our unittests we built a docker image with requirements for kouyierr. You can use it as well from this repo
docker pull vmdude/kouyierr-docker
docker run -it vmdude/kouyierr-docker
This project is licensed under the MIT License (see the
LICENSE
file for details).
FAQs
Document Generator, aka Doc As Code
We found that kouyierr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.