{"id":28214082,"url":"https://github.com/vzool/vzool-config.py","last_synced_at":"2025-09-06T04:36:27.809Z","repository":{"id":257813296,"uuid":"868749669","full_name":"vzool/vzool-config.py","owner":"vzool","description":"A class for managing configuration settings in a SQLite database.","archived":false,"fork":false,"pushed_at":"2024-10-07T06:42:11.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T23:04:23.103Z","etag":null,"topics":["config","python3","sqlite3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/vzool-config/","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/vzool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-07T05:47:46.000Z","updated_at":"2024-10-07T07:25:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"2363c684-67b6-4781-95aa-2180a64ae04c","html_url":"https://github.com/vzool/vzool-config.py","commit_stats":null,"previous_names":["vzool/vzool-config.py"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vzool/vzool-config.py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vzool%2Fvzool-config.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vzool%2Fvzool-config.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vzool%2Fvzool-config.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vzool%2Fvzool-config.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vzool","download_url":"https://codeload.github.com/vzool/vzool-config.py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vzool%2Fvzool-config.py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270065443,"owners_count":24520946,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["config","python3","sqlite3"],"created_at":"2025-05-17T20:12:12.745Z","updated_at":"2025-08-12T13:08:48.065Z","avatar_url":"https://github.com/vzool.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfigManager: A Python Class for Managing Configuration Settings\n\n## Purpose:\n\nThe ConfigManager class provides a convenient way to store and retrieve configuration settings in a SQLite database. It offers a simple interface for setting, getting, and deleting configuration values.\n\n## Features:\n\n- SQLite Database: Stores configuration settings in a SQLite database for persistence.\n- Data Type Support: Handles various data types including strings, integers, floats, decimals, booleans, and JSON objects.\n- Automatic Table Creation: Creates the necessary table in the database if it doesn't exist.\n- Error Handling: Provides clear error messages for invalid data types or database operations.\n- Testing: Includes a built-in test function to ensure proper functionality.\n\n## Installation:\n\n```shell\npip install vzool-config\n```\n\n## Usage:\n\n1- Import the Class:\n\n```python\nfrom vzool_config import ConfigManager\n```\n\n2- Create an Instance:\n\n```python\nconfig = ConfigManager(db_file=\"my_config.db\")  # Customize the database filename\n```\n\n3- Set Configuration Values:\n\n```python\nconfig.set(\"api_key\", \"your_api_key\")\nconfig.set(\"enabled\", True)\nconfig.set(\"max_items\", 10)\n```\n\n4- Get Configuration Values:\n\n```python\napi_key = config.get(\"api_key\")\nenabled = config.get(\"enabled\", False)  # Provide a default value\n```\n\n5- Delete Configuration Values:\n```python\nconfig.delete(\"max_items\")\n```\n\n6- Close the Database Connection:\n\n```python\nconfig.close()\n```\n\n## Example:\n\n```python\nif __name__ == \"__main__\":\n    config = ConfigManager()\n    config.set(\"name\", \"John Doe\")\n    config.set(\"age\", 30)\n    config.set(\"preferences\", {\"color\": \"blue\", \"food\": \"pizza\"})\n\n    name = config.get(\"name\")\n    age = config.get(\"age\")\n    preferences = config.get(\"preferences\")\n\n    print(name)  # Output: John Doe\n    print(age)  # Output: 30\n    print(preferences)  # Output: {'color': 'blue', 'food': 'pizza'}\n\n    config.close()\n```\n\n## Additional Notes:\n\n- The ConfigManager class is designed for simplicity and ease of use.\n- For more complex configuration scenarios, consider using specialized libraries or frameworks.\n- Ensure that the SQLite database file has appropriate permissions.\n\n## Contributing:\n\nContributions are welcome! Please feel free to fork the repository, make changes, and submit a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvzool%2Fvzool-config.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvzool%2Fvzool-config.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvzool%2Fvzool-config.py/lists"}