{"id":21905054,"url":"https://github.com/kenjyco/libs","last_synced_at":"2026-05-16T00:40:59.314Z","repository":{"id":145905252,"uuid":"485329583","full_name":"kenjyco/libs","owner":"kenjyco","description":"Easily install kenjyco libs","archived":false,"fork":false,"pushed_at":"2025-07-21T12:56:24.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-21T14:49:27.040Z","etag":null,"topics":["api","cli","command-line","data","helper","kenjyco","libs","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kenjyco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-04-25T10:45:11.000Z","updated_at":"2025-07-21T12:56:28.000Z","dependencies_parsed_at":"2025-07-21T14:33:16.811Z","dependency_job_id":"c385b466-214f-432b-b0cd-919d330011a8","html_url":"https://github.com/kenjyco/libs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/kenjyco/libs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Flibs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Flibs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Flibs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Flibs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenjyco","download_url":"https://codeload.github.com/kenjyco/libs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Flibs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274719102,"owners_count":25337237,"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-09-11T02:00:13.660Z","response_time":74,"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":["api","cli","command-line","data","helper","kenjyco","libs","python"],"created_at":"2024-11-28T16:28:10.069Z","updated_at":"2025-10-23T23:26:05.138Z","avatar_url":"https://github.com/kenjyco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[aws-info-helper]: https://github.com/kenjyco/aws-info-helper/blob/master/README.md\n[bg-helper]: https://github.com/kenjyco/bg-helper/blob/master/README.md\n[chloop]: https://github.com/kenjyco/chloop/blob/master/README.md\n[dt-helper]: https://github.com/kenjyco/dt-helper/blob/master/README.md\n[expectation-helper]: https://github.com/kenjyco/expectation-helper/blob/master/README.md\n[fs-helper]: https://github.com/kenjyco/fs-helper/blob/master/README.md\n[input-helper]: https://github.com/kenjyco/input-helper/blob/master/README.md\n[mongo-helper]: https://github.com/kenjyco/mongo-helper/blob/master/README.md\n[readme-helper]: https://github.com/kenjyco/readme-helper/blob/master/README.md\n[redis-helper]: https://github.com/kenjyco/redis-helper/blob/master/README.md\n[settings-helper]: https://github.com/kenjyco/settings-helper/blob/master/README.md\n[sql-helper]: https://github.com/kenjyco/sql-helper/blob/master/README.md\n[testing-helper]: https://github.com/kenjyco/testing-helper/blob/master/README.md\n[webclient-helper]: https://github.com/kenjyco/webclient-helper/blob/master/README.md\n\nA meta-package that orchestrates development workflows across the kenjyco helper library ecosystem. This library provides sophisticated ecosystem coordination by grouping related extra dependency sets, managing editable installations, and cloning repositories without typical setup friciton.\n\nEvery operation interrogates actual system state rather than making optimistic assumptions, and missing components never break core functionality. It's particularly valuable as an example for developers working with complex package ecosystems who need reliable, transparent, and composable development workflows.\n\n## Install\n\nUse `pip` to install [kenjyco-libs](https://github.com/kenjyco/libs), ideally to a [virtual environment (venv)](https://docs.python.org/3/library/venv.html). You can choose `kenjyco-libs` (very light weight), `\"kenjyco-libs[full]\"` (everything), or something in between.\n\n- `pip install kenjyco-libs`\n    - Includes: [bg-helper][], click, [fs-helper][], [input-helper][], [settings-helper][]\n- `pip install \"kenjyco-libs[ipython]\"`\n    - Includes: ipython, kenjyco-libs\n- `pip install \"kenjyco-libs[xmljson]\"`\n    - Includes: kenjyco-libs, xmljson\n- `pip install \"kenjyco-libs[bs4]\"`\n    - Includes: beautifulsoup4, kenjyco-libs, lxml\n    - Also requires system requirements for `lxml`\n\n    ```\n    sudo apt-get install -y libxml2 libxslt1.1 libxml2-dev libxslt1-dev\n    ```\n\n    or\n\n    ```\n    brew install libxml2\n    ```\n- `pip install \"kenjyco-libs[nosql]\"`\n    - Includes: [chloop][], kenjyco-libs, [mongo-helper][], [redis-helper][]\n- `pip install \"kenjyco-libs[sql]\"`\n    - Includes: [expectation-helper][], kenjyco-libs, [sql-helper][]\n    - Also requires the `pg_config` executable\n    - expectation-helper is only included if using Python 3.8+\n\n    ```\n    sudo apt-get install -y libpq-dev\n    ```\n\n    or\n\n    ```\n    brew install postgresql\n    ```\n- `pip install \"kenjyco-libs[data]\"`\n    - Includes: [aws-info-helper][], [dt-helper][],\n      \"kenjyco-libs[nosql,sql,xmljson]\", [webclient-helper][]\n- `pip install \"kenjyco-libs[dev]\"`\n    - Includes: kenjyco-libs, [readme-helper][], [testing-helper][]\n- `pip install \"kenjyco-libs[full]\"`\n    - Includes: \"kenjyco-libs[bs4,data,dev,ipython]\"\n\n## Default settings.ini\n\n```ini\n[default]\npackage_repos_base_path = ~/repos/personal/packages\nkenjyco_libs_repo_names = aws-info-helper, bg-helper, chloop, dt-helper, expectation-helper, fs-helper, input-helper, libs, mongo-helper, readme-helper, redis-helper, settings-helper, sql-helper, testing-helper, webclient-helper\ndependency_repos_base_path = ~/repos/some-repos\n\n[dev]\nsomething =\n\n[test]\nsomething =\n```\n\nThe first time that `kenjyco_libs` is imported, the sample [settings.ini](https://github.com/kenjyco/libs/blob/master/kenjyco_libs/settings.ini) file will be copied to the `~/.config/kenjyco-libs` directory.\n\n## QuickStart\n\nThe most powerful workflow is the **complete development environment setup** for whichever combination of \"extras\" that were installed via pip.\n\nRun the provided **`kenjyco-dev-setup`** script to clone kenjyco repos and their dependencies to the paths specified in settings.ini. The packages will be reinstalled in \"editable mode\" (i.e. the packages in the venv's site-packages directory will be linked to the cloned kenjyco repos).\n\n```\nkenjyco-dev-setup\n```\n\nUse **`kenjyco-ipython`** to start ipython with all of the installed kenjyco packages automatically imported as their preferred 2-character aliases, keeping your ipython shell history clean from boilerplate import statements.\n\n```\nkenjyco-ipython\n```\n\n\u003e Optionallly pass `--no-vi` to disable vi editing mode or `--no-colors` to not use colors and syntax highlighting.\n\n## API Overview\n\n### High-Level Workflow Functions\n\n- **`dev_setup(py_versions='', show=True)`** - Complete ecosystem setup workflow\n  - `py_versions`: String containing Python versions to make venvs for (separated by `,`, `;`, or `|`)\n  - `show`: If True, show the `git`/`pip` commands before executing\n  - Internal calls: `clone_all_missing()`, `install_packages_in_editable_mode()`\n\n- **`clone_all_missing(show=True)`** - Clone package and dependency repositories locally\n  - `show`: If True, show the `git` command before executing\n  - Internal calls: `_clone_packages()`, `_clone_dependencies()`\n\n- **`install_packages_in_editable_mode(show=True)`** - Install cloned packages in editable mode\n  - `show`: If True, show the `pip` command before executing\n  - Return: Result of pip install editable operations\n  - Internal calls: `bh.tools.pip_install_editable()`\n\n### Environment State Interrogation Functions\n\n- **`_get_clone_status_for_packages()`** - Discover which ecosystem packages are cloned locally\n  - Return: Dictionary with keys `cloned` (name to path mapping) and `uncloned` (name to expected_path mapping)\n  - Internal calls: None\n\n- **`_get_clone_status_for_dependencies()`** - Discover which dependency packages are cloned locally\n  - Return: Dictionary with keys `cloned` (name→path mapping) and `uncloned` (name→expected_path mapping)\n  - Internal calls: None\n\n- **`_get_kenjyco_pkgs_in_venv()`** - Identify which ecosystem packages are installed\n  - Return: Set intersection of installed packages and ecosystem package names\n  - Internal calls: `bh.tools.installed_packages()`\n\n- **`_get_dependencies_in_venv()`** - Identify which dependency packages are installed\n  - Return: Set intersection of installed packages and known dependency names (lowercased)\n  - Internal calls: `bh.tools.installed_packages()`\n\n### Repository Cloning Functions\n\n- **`_clone_packages(show=True)`** - Clone ecosystem package repositories locally\n  - `show`: If True, show the `git` command before executing\n  - Internal calls: `_get_clone_status_for_packages()`, `_get_kenjyco_pkgs_in_venv()`, `bh.tools.git_clone()`\n\n- **`_clone_dependencies(show=True)`** - Clone external dependency repositories locally\n  - `show`: If True, show the `git` command before executing\n  - Internal calls: `_get_clone_status_for_dependencies()`, `_get_dependencies_in_venv()`, `bh.tools.git_clone()`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenjyco%2Flibs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenjyco%2Flibs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenjyco%2Flibs/lists"}