{"id":15472499,"url":"https://github.com/miketheman/python-private-packages","last_synced_at":"2025-12-11T18:10:57.459Z","repository":{"id":141739848,"uuid":"326078357","full_name":"miketheman/python-private-packages","owner":"miketheman","description":"Example of using Python naming for internal packages and modules","archived":false,"fork":false,"pushed_at":"2024-03-20T15:51:17.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-19T06:42:05.217Z","etag":null,"topics":["example","pytest","python","python-packages","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miketheman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-01-02T00:11:35.000Z","updated_at":"2024-03-20T15:51:21.000Z","dependencies_parsed_at":"2024-03-20T17:06:44.033Z","dependency_job_id":null,"html_url":"https://github.com/miketheman/python-private-packages","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"7bf178fb2d7200bf22758f6c743c3215e6c4afbc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miketheman%2Fpython-private-packages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miketheman%2Fpython-private-packages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miketheman%2Fpython-private-packages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miketheman%2Fpython-private-packages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miketheman","download_url":"https://codeload.github.com/miketheman/python-private-packages/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243223150,"owners_count":20256428,"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":["example","pytest","python","python-packages","python3"],"created_at":"2024-10-02T02:39:16.587Z","updated_at":"2025-12-11T18:10:57.399Z","avatar_url":"https://github.com/miketheman.png","language":"Python","readme":"# python-private-packages\n\nAn exercise exploring the behaviors of Python Packages and how to create\nprivate packages.\n\nThe approach is to take a simple task, and refactor it to an extreme\n\nIn reality, you likely would never do this specifically, but the exmaple is here\nto be explored for its structural benefits, not the task itself.\n\n## Requirements\n\nTo measure the success here, I set myself some guidelines:\n\n- The code has to be readily testable by `pytest`\n- The code has to pass `pylint` with no customiztion/overrides\n\n**Note:** In most real-world scenarios, there's often some configuration for\n`pylint`, such as removing a requirement for test functions to have docstrings.\nInstead of trying to disable things, I've opted to not configure `pylint`,\nrather provide simple (if not very useful) docstrings to pass the linter.\nPlease don't judge the content of these docstrings.\n\n## The App\n\nWell, the ultimate goal of \"my awesome app\" is to return a `\"Hello, world.\"`\nstring.\n\nYes, that's it.\n\nBut instead of simply accomplishing the task like some normal person, let's\nrefactor the task to a crazy degree, splitting pieces of work apart to explore\nimport and test structure.\n\nAs a way to separate concerns, the `myawesomeapp` package is only responsible\nfor the execution part - not the internals of how to construct and represent\nthe desired outcome.\n\nThe rest of the phrase's work is delegated to the `helloworld` package, which\ncould be an open source/installed package, or part of the same codebase.\n\nBy segregating the internals of what is essentially a subdirectory structure\nwth a naming convention, we create a boundary which can be broken, but\nconvention shows the user the \"right way\".\n\nAfter all, [we are all responsible users][].\n\n[we are all responsible users]: https://docs.python-guide.org/writing/style/#we-are-all-responsible-users\n\n## Running\n\nIf you want to checkout the code, run the tests yourself, please do!\n\n1. Clone the repository locally\n2. Run `make init` to install the requisite dependencies\n3. Run `make test` to execute the tests\n\nRun `make uninstall` to have `pipenv` remove the created virtualenv.\nWe don't remove [`pipenv`][] itself, since it's an awesome tool, check it out.\n\n[pipenv]: https://pipenv.pypa.io/\n\n## Author\n\n- [Mike Fiedler](https://github.com/miketheman)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiketheman%2Fpython-private-packages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiketheman%2Fpython-private-packages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiketheman%2Fpython-private-packages/lists"}