# CorsacLib
The python package that manages logs for Corsac.
## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
## Introduction
CorsacLib is a managed logger that utilizes post quantum cryptography to enable users to safely store and verify data.
The crypto libraries used are:
- [sphincs+](https://sphincs.org/)
- AES-256-CBC
## Installation
CorsacLib can be installed via [PyPI](https://pypi.org/project/corsaclib/).
- Run `pip install corsaclib`
- Export a `config.json` or `config.yml` file from Corsac KMS.
## Usage
All you need is a config generated by Corsac KMS and an application that requires logging.
To initialize the logger you can do the following:
```python
from corsaclib import LogHandler
logHandler = LogHandler(configfile="config.yml", filetype="yaml", directory="logs/", create_directory=False)
"""
### Arguments
configfile : str
The path to the configuration file.
filetype : FileType
The type of the configuration file.
json or yaml.
deleteconfig : bool
Whether the configuration file should be scrubbed after loading.
directory : str
The directory where the logs are stored.
create_directory : bool
Whether the directory should be created.
logchain_size : int
The maximum amount of logs that will be stored in one file.
"""
```
To start logging, run the following:
```python
logHandler.log({"user":"dev-umla", "action":"restarted firmware"})
"""
### Parameters
log : dict
The log to write.
join_queue : bool
Whether to process all items in the log queue.
A blocking operation.
"""
```
## Contributing
Contributions to this project are welcome. To contribute, please follow these guidelines:
1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Make your changes and commit them.
4. Push your changes to your forked repository.
5. Submit a pull request.
## License
This project is licensed under the [MIT License](LICENSE).
Raw data
{
"_id": null,
"home_page": "",
"name": "corsaclib",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,log management,key management,files,sockets",
"author": "mvedu (Marijn van Dijk)",
"author_email": "<dijkmarijnvan@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/72/24/d57c62c0537304de4e3a4dfccb2fd9e523bfa3a663ccb3d291d8220cbef6/corsaclib-0.0.2.tar.gz",
"platform": null,
"description": "# CorsacLib\nThe python package that manages logs for Corsac.\n\n## Table of Contents\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nCorsacLib is a managed logger that utilizes post quantum cryptography to enable users to safely store and verify data.\nThe crypto libraries used are:\n- [sphincs+](https://sphincs.org/)\n- AES-256-CBC\n\n## Installation\n\nCorsacLib can be installed via [PyPI](https://pypi.org/project/corsaclib/).\n\n- Run `pip install corsaclib`\n- Export a `config.json` or `config.yml` file from Corsac KMS.\n\n## Usage\nAll you need is a config generated by Corsac KMS and an application that requires logging.\nTo initialize the logger you can do the following:\n```python\nfrom corsaclib import LogHandler\n\nlogHandler = LogHandler(configfile=\"config.yml\", filetype=\"yaml\", directory=\"logs/\", create_directory=False)\n\n\"\"\"\n### Arguments\n\nconfigfile : str\n The path to the configuration file.\nfiletype : FileType\n The type of the configuration file.\n json or yaml.\ndeleteconfig : bool\n Whether the configuration file should be scrubbed after loading.\ndirectory : str\n The directory where the logs are stored.\ncreate_directory : bool\n Whether the directory should be created.\nlogchain_size : int\n The maximum amount of logs that will be stored in one file.\n\"\"\"\n```\n\nTo start logging, run the following:\n```python\nlogHandler.log({\"user\":\"dev-umla\", \"action\":\"restarted firmware\"})\n\n\"\"\"\n### Parameters\n \nlog : dict\n The log to write.\njoin_queue : bool\n Whether to process all items in the log queue.\n A blocking operation.\n\"\"\"\n```\n\n\n## Contributing\n\nContributions to this project are welcome. To contribute, please follow these guidelines:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bug fix.\n3. Make your changes and commit them.\n4. Push your changes to your forked repository.\n5. Submit a pull request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).",
"bugtrack_url": null,
"license": "",
"summary": "Securely managing logs the easy way",
"version": "0.0.2",
"project_urls": null,
"split_keywords": [
"python",
"log management",
"key management",
"files",
"sockets"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7224d57c62c0537304de4e3a4dfccb2fd9e523bfa3a663ccb3d291d8220cbef6",
"md5": "eba88486077218315855625a67187e36",
"sha256": "bad23462bcc7b2400cba83c038cbc766ef773f6832998f2eef95c92058b906ff"
},
"downloads": -1,
"filename": "corsaclib-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "eba88486077218315855625a67187e36",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4807,
"upload_time": "2023-12-15T13:54:21",
"upload_time_iso_8601": "2023-12-15T13:54:21.639010Z",
"url": "https://files.pythonhosted.org/packages/72/24/d57c62c0537304de4e3a4dfccb2fd9e523bfa3a663ccb3d291d8220cbef6/corsaclib-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-15 13:54:21",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "corsaclib"
}