ConSolar Framework Documentation
Overview
ConSolar is a console framework for building extensible console applications with plugin support.
Getting Started
Installation
Clone the repository and install dependencies from requirements.txt using pip install -r requirements.txt.
Basic Usage
from consolar import user, Framework, Plugin, load_plugin
# Create a user input
user.user_input("Enter your name:")
print(user.user_value)
API Reference
class user
user_input(question: str) -> None: Prompts the user for input. Result is stored inuser_value.multi_choice(question: str, options: list) -> None: Prompts the user to select from options. Result is stored inuser_value.user_value: Stores the last answer from user input or choice.
class Framework
register_plugin(plugin: Plugin): Registers a plugin instance.plugins: List of registered plugins.
class Plugin
run(): Method to be implemented by plugins.
function load_plugin(module_name: str, class_name: str) -> Plugin
Dynamically loads a plugin class from a module.
Writing Plugins
- Inherit from
Plugin:
from consolar.plugin_manger import Plugin
class MyPlugin(Plugin):
def run(self):
print("MyPlugin is running!")
- Register with the framework:
from consolar.plugin_manger import Framework
fw = Framework()
fw.register_plugin(MyPlugin())
Logger
- automaticly log the target with toggble visbilty
from consolar.logger import log
x = input("foo bar? ")
log(target= x, show_target= True, repeat= 1)
Error Handling
- Plugin registration errors are printed to the console.
Contribution
- Fork the repo, add features, and submit pull requests.
License
MIT
Copyright (c) 2025 Samyar Sharafi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Metadata
Release files for consolar 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| consolar-0.0.1.tar.gz | 4.3 kB | Without provenance | Details for consolar-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| consolar-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for consolar-0.0.1-py3-none-any.whl |
Total release size: 10.7 kB
Release files / consolar-0.0.1.tar.gz
| Download URL | consolar-0.0.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d04b59ce9537b0f8e4464f95c09c43f13e062aa14de8048925f1daabdf8bf010
|
|
BLAKE2b-256 checksum How to use checksums |
d3a00d466d550fedee1b999f9301fdf3a523cd7b6c41f11364e912a1c14284d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / consolar-0.0.1-py3-none-any.whl
| Download URL | consolar-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
373876d21f59e091d349b5db6c1d6c2de40944c7096eda261c62bda04cdef205
|
|
BLAKE2b-256 checksum How to use checksums |
dec04534f4f117fd3dcf5984895c02ed7fc298d04968ef23cdba8ecc6d927cc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for consolar 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.