{"id":16135337,"url":"https://github.com/marktennyson/nc-console","last_synced_at":"2025-04-06T16:18:23.268Z","repository":{"id":57445205,"uuid":"384389801","full_name":"marktennyson/nc-console","owner":"marktennyson","description":"The programmatic consoler.","archived":false,"fork":false,"pushed_at":"2022-05-30T06:33:50.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T22:38:06.901Z","etag":null,"topics":["click","logger","logging","print"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marktennyson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-09T09:37:02.000Z","updated_at":"2022-05-30T08:54:44.000Z","dependencies_parsed_at":"2022-09-26T17:30:41.451Z","dependency_job_id":null,"html_url":"https://github.com/marktennyson/nc-console","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marktennyson%2Fnc-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marktennyson%2Fnc-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marktennyson%2Fnc-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marktennyson%2Fnc-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marktennyson","download_url":"https://codeload.github.com/marktennyson/nc-console/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509241,"owners_count":20950232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["click","logger","logging","print"],"created_at":"2024-10-09T23:07:10.593Z","updated_at":"2025-04-06T16:18:23.247Z","avatar_url":"https://github.com/marktennyson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nc-console\n\n The programmatic consoler.  \n Checkout the official documentation at [nc-console.netlify.app](https://nc-console.netlify.app)  \n Official PYPI link : [pypi](https://pypi.org/project/nc-console)\n\n##### Now it's quite easy to log the status and take inputs from the terminal using nc-colsole.\n\n### Introduction\n\nnc-console provides you a clean, understandable and programmatic overview to log your data on the terminal or take inputs from the terminal. \n\nIt's internally using the [click](https://click.palletsprojects.com/en/8.0.x/) module from [palletsprojects](https://palletsprojects.com/) to deliver such services.\n\n### Requirements\n\nTo use this module you must need to use Python version 3.6 or grater than it.\n\nThis module requires the following modules:\n* click==8.0.1\n\n### Installation\n\nYou can install the package from the official PYPI:\n```bash\npip install nc-console\n```\nYou can install it directly from the source code:\n```bash\ngit clone https://github.com/marktennyson/nc-console.git \u0026\u0026 cd nc-colsole\npython setup.py install\n```\n\n### Usage\n\n#### Implementation of logging system.\n##### It gives you a very logical way to print your logging output.\n\nFor a basic example:\n```python\nfrom nc_console import Console\nConsole.log.Info(\"This is the first info message.\")\n```\nAnd the output will be:\n```bash\n[ INFO ] This is the first info message. \n```\nAvailable options/methods to print the different log:\n```python\nConsole.log.Info() # to log a info type message.\nConsole.log.Warning() # to log a warning type message.\nConsole.log.Success() # to log a success type message.\nConsole.log.Error() # to log a error type message.\n```\n* The default colour for type `info` is `bright_blue`.\n* The default colour for type `success` is `bright_green`.\n* The default colour for type `warning` is `bright_magenta`.\n* The default colour for type `Error` is `bright_red`.\n* The default colour for `message` is `yellow`.\n\nIt's very easy to change the default colours. To do this please go with the below mentioned steps:\n```python\nfrom nc_console import Console\n\nConsole.setLogConfig(\n        box_colour=\"cyan\"\n        type_info_colour=\"red\"\n        ...\n)\n```\nSo using the `setLogConfig` method you can adjust the default colours.\nAvailable parameters for the `setLogConfig` method are:\n* box_colour : to change the box([]) colour.\n* msg_colour : to change the colour of message.\n* type_info_colour : to change the base colour for the type info.\n* type_success_colour : to change the base colour for the type success.\n* type_warning_colour : to change the base colour for the type warning.\n* type_error_colour : to change the base colour for the type error.\n\nAll of the colours accept the default available colour for `click.style`.\n\n#### Implementation of input system.\n##### Beside the logging system this module is able to take inputs from the terminal too. This system will give you the feel like Java.\n\nFor a basic example:\n```python\nfrom nc_console import Console\n\n#To take a string based input from the terminal\nname = Console.input.String(\"Enter your name: \")\n\n#To take a Integer based input from the terminal\nage = Console.input.Integer(\"Enter your age: \")\n```\nThe output will be:\n```bash\n[INPUT STRING] Enter your name: \n[INPUT INTEGER] Enter your age:\n```\n\nAvailable options/methods to take different types of input from the terminal:\n```python\nConsole.input.String() # to take a string type input.\nConsole.input.Password() # to take a password type input.\nConsole.input.Integer() # to take a integer type input.\nConsole.input.Float() # to take a float type input.\nConsole.input.Boolean() # to take a blooean type input(Y/n).\n```\n\n* The default colour for `type` is `bright_blue`.\n* The default colour for `message` is `yellow`.\n\nIt's very easy to change the default colours for the input system too. To do this please go with the below mentioned steps:\n```python\nfrom nc_console import Console\n\nConsole.setInputConfig(\n        box_colour=\"cyan\"\n        msg_colour=\"red\"\n        ...\n)\n```\n\nSo using the `setInputConfig` method you can adjust the default colours.\nAvailable parameters for the `setLogConfig` method are:\n* box_colour : to change the box([]) colour.\n* msg_colour : to change the colour of message.\n* base_colour : to change the base colour for the input text.\n* type_colour : to change the input type colour.\n\nAll of the colours accept the default available colour for `click.style`.\n\n### Maintainers\nCurrent Maintainers:\n1. Aniket sarkar aka [marktennyson](https://github.com/marktennyson)\n\n### Contributors\nCurrent Contributors:  \n\n\u003ca href=\"https://github.com/marktennyson/nc-console/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=marktennyson/nc-console\" /\u003e\n\u003c/a\u003e\n\n### Contribution\n\nIf you want to become a contributor of this project then please contact me at =\u003e `aniketsarkar@yahoo.com` or follow the below mentioned steps.\n\n1. Fork and clone this repository.\n2. Make some changes as required.\n3. Write unit test to showcase its functionality.\n4. Submit a pull request under `development` branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarktennyson%2Fnc-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarktennyson%2Fnc-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarktennyson%2Fnc-console/lists"}