{"id":20154696,"url":"https://github.com/sebastianbrzustowicz/cli-users-management","last_synced_at":"2026-05-06T08:32:05.483Z","repository":{"id":212152113,"uuid":"726419245","full_name":"sebastianbrzustowicz/CLI-users-management","owner":"sebastianbrzustowicz","description":"Python + SQL. CLI user management script for efficient control of user accounts, viewing information and creating databases.","archived":false,"fork":false,"pushed_at":"2023-12-20T18:47:39.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T00:05:16.162Z","etag":null,"topics":["cli","csv","database","db","json","python","script","sql","sqlite3","unittest","xml"],"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/sebastianbrzustowicz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2023-12-02T10:46:07.000Z","updated_at":"2023-12-12T19:42:44.000Z","dependencies_parsed_at":"2023-12-12T20:29:41.947Z","dependency_job_id":"a7d24a10-18c8-4e2b-b9af-ddaec74ffc6f","html_url":"https://github.com/sebastianbrzustowicz/CLI-users-management","commit_stats":null,"previous_names":["sebastianbrzustowicz/cli-users-management"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sebastianbrzustowicz/CLI-users-management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbrzustowicz%2FCLI-users-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbrzustowicz%2FCLI-users-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbrzustowicz%2FCLI-users-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbrzustowicz%2FCLI-users-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebastianbrzustowicz","download_url":"https://codeload.github.com/sebastianbrzustowicz/CLI-users-management/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianbrzustowicz%2FCLI-users-management/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32684624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","csv","database","db","json","python","script","sql","sqlite3","unittest","xml"],"created_at":"2024-11-13T23:28:06.346Z","updated_at":"2026-05-06T08:32:05.465Z","avatar_url":"https://github.com/sebastianbrzustowicz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n### CLI users management\nAuthor: Sebastian Brzustowicz  \nThe script uses only the Python Standard Library.  \nThis script is helpful with managing data with different types of files. (.json, .csv, .xml, .db)  \nAll data files should be stored in `data` folder.   \nThe structure of the processed data is as follows:\n- `firstname`\n- `telephone_number`\n- `email`\n- `password` in plaintext\n- `role`(admin/user)\n- `created_at` date in format YYYY-MM-DD HH:MM:SS\n- List of `children` with `(name, age)`\n\n### Unit tests are available\nInput:\n\n```python\n\ncd tests\npython test.py\n\n```\n\nOutput:\n\n```\nData completeness test from JSON file\n.\nJSON data sample validation\n.\nData completeness test from XML file\n.\nXML data sample validation\n.\nData completeness test from CSV file\n.\nCSV data sample validation\n.\nData completeness test from DB file\n.\nDB data sample validation\n.\nImporting multiple files\n.\nEmails validation\n.\nTelephone numbers validation\n.\nRemove duplicates\n.\nAuthentication - successful\n.\nAuthentication - wrong login\n.\nAuthentication - wrong password\n.\nPrint all account\n.\nPrint oldest account\n.\nGroup by age\n.\nPrint children\n.\nFind similar children by age\n.\nCreating database\n.\n----------------------------------------------------------------------\nRan 21 tests in 0.034s\n\nOK\n```\n\n## CLI commands\nThe structure of raw command: `python script.py \u003ccommand\u003e --login \u003clogin\u003e --password \u003cpassword\u003e`\n\n### Available commands:\nAdmin:\n- `print-all-accounts`\n- `print-oldest-account`\n- `group-by-age`\n- `create_database`\n  \nAdmin or user:\n- `print-children`\n- `find-similar-children-by-age`\n\n# Examples\nThis section shows the use of each command.\n\n## `print-all-accounts`\nThis command shows how many users are in users data.\n\nInput:\n\n```python\n\npython script.py print-all-accounts --login \"kimberlymartin@example.org\" --password \"ns6REVen+g\"\n\n```\n\nOutput:\n\n```\n84\n```\n\n## `print-oldest-account`\nThis command shows oldest existing account.\n\nInput:\n\n```python\n\npython script.py print-oldest-account --login \"kimberlymartin@example.org\" --password \"ns6REVen+g\"\n\n```\n\nOutput:\n\n```\nname: Justin\nemail_address: opoole@example.org\ncreated_at: 2022-11-25 02:19:37\n```\n\n## `group-by-age`\nThis command displays the number of all children grouped by age, sorted in ascending order of quantity.\n\nInput:\n\n```python\n\npython script.py group-by-age --login \"kimberlymartin@example.org\" --password \"ns6REVen+g\"\n\n```\n\nOutput:\n\n```\nage: 5, count: 4\nage: 10, count: 4\nage: 14, count: 4\nage: 18, count: 5\nage: 15, count: 5\nage: 9, count: 5\nage: 6, count: 5\nage: 7, count: 5\nage: 16, count: 5\nage: 3, count: 7\nage: 13, count: 7\nage: 4, count: 7\nage: 8, count: 9\nage: 12, count: 9\nage: 11, count: 10\nage: 17, count: 10\nage: 2, count: 10\nage: 1, count: 10\n```\n\n## `print-children`\nThis command shows user's children data.\n\nInput:\n\n```python\n\npython script.py print-children --login \"kimberlymartin@example.org\" --password \"ns6REVen+g\"\n\n```\n\nOutput:\n\n```\nJustin, 15\nSarah, 10\n```\n\n## `find-similar-children-by-age`\nThis command shows children with similar age (and their parent) as user's children.\n\nInput:\n\n```python\n\npython script.py find-similar-children-by-age --login \"kimberlymartin@example.org\" --password \"ns6REVen+g\"\n\n```\n\nOutput:\n\n```\nMichael, 667574950: Justin, 15; Sarah, 10\nJamie, 608442660: Jesse, 7; Jonathan, 13; Victor, 10\nSean, 650232530: Dan, 10\nFelicia, 394426853: Jennifer, 2; Omar, 10\nDonna, 893849179: Kimberly, 2; Mark, 15; Paul, 1\nAmanda, 698312978: Brenda, 1; Christopher, 15; Lisa, 8\nJeffrey, 854869516: Brian, 13; John, 15\nEric, 110355347: Evan, 2; Mary, 1; Mary, 15\n```\n\n## `create_database`\nThis command allows the administrator to create a database via SQLite with all the collected data. Script allows to read files with .db extension.\n\nInput:\n\n```python\n\npython script.py create_database --login \"kimberlymartin@example.org\" --password \"ns6REVen+g\"\n\n```\n\nOutput:\n\n```\nDatabase created successfully.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianbrzustowicz%2Fcli-users-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianbrzustowicz%2Fcli-users-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianbrzustowicz%2Fcli-users-management/lists"}