{"id":15297330,"url":"https://github.com/evertonsavio/python-factory-serializer","last_synced_at":"2025-10-04T00:57:06.413Z","repository":{"id":232086218,"uuid":"783431366","full_name":"evertonsavio/python-factory-serializer","owner":"evertonsavio","description":"Python OOP - Implementing a abstract factory pattern on classes that instatiate a JSON, XML or other implemented Serializer","archived":false,"fork":false,"pushed_at":"2024-04-11T19:40:39.000Z","size":29,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T00:57:03.548Z","etag":null,"topics":["fact","oop","py","solid"],"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/evertonsavio.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":"2024-04-07T21:23:45.000Z","updated_at":"2024-10-05T00:15:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"b09e9c6e-a3f2-4310-af2c-88dba8eccd27","html_url":"https://github.com/evertonsavio/python-factory-serializer","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"e6ed2bf777ba51400cd87c289f7da2a6cce8f868"},"previous_names":["evertonsavio/python-factory-serializer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evertonsavio/python-factory-serializer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fpython-factory-serializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fpython-factory-serializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fpython-factory-serializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fpython-factory-serializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evertonsavio","download_url":"https://codeload.github.com/evertonsavio/python-factory-serializer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertonsavio%2Fpython-factory-serializer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278250088,"owners_count":25955840,"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-10-03T02:00:06.070Z","response_time":53,"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":["fact","oop","py","solid"],"created_at":"2024-09-30T19:16:43.050Z","updated_at":"2025-10-04T00:57:06.398Z","avatar_url":"https://github.com/evertonsavio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Solid Abstract Factory\n\nThis repository demonstrates the implementation of an Abstract Factory in Python.  \n\nUnder [project/models](https://github.com/evertonsavio/python-factory-serializer/tree/master/project/models) we have a class called `Song.py` that inherits Serializable.py\nThis allows an instance of `Song.py` being able to serialize itself choosing a FormatType like JSON or XML. You can check this on [main.py](https://github.com/evertonsavio/python-factory-serializer/blob/master/main.py).\n\nFor implementing a new format using this code we only need to add our new format implementation file under [serializers](https://github.com/evertonsavio/python-factory-serializer/tree/master/serializer/serializers/impl) and register it on [registers.py](https://github.com/evertonsavio/python-factory-serializer/blob/master/serializer/constants/registers.py). That's it, all your model classes that inherits [Serializable.py](https://github.com/evertonsavio/python-factory-serializer/blob/master/serializer/Serializable.py) now can serialize itself to the new format.\nWe don't need to change anything on the class factories or on the core implementation. Check this PR for more information on how this can be done: [PR](https://github.com/evertonsavio/python-factory-serializer/pull/1)\n\n## Python\n\n1. Create your environment:\n```commandline\npython -m venv .venv\n```\n2. Activate your environment\n```commandline\n . ./.venv/Scripts/activate \n.\\venv\\Scripts\u003e . activate\n```\n3. install your dependencies\n```commandline\npip install -r ./requirements.txt\n```\n4. Run project\n```commandline\npython main.py\n```\n5. Deactivate Environment\n```commandline\ndeactivate\n```\n### Development\n```\npip install PyYAML\npip freeze \u003e requirements.txt\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevertonsavio%2Fpython-factory-serializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevertonsavio%2Fpython-factory-serializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevertonsavio%2Fpython-factory-serializer/lists"}