{"id":20644053,"url":"https://github.com/adjust/pg_type_template","last_synced_at":"2025-09-12T21:38:44.537Z","repository":{"id":66825004,"uuid":"371074657","full_name":"adjust/pg_type_template","owner":"adjust","description":"An extension template for Postgres type","archived":false,"fork":false,"pushed_at":"2025-06-25T14:06:28.000Z","size":42,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":35,"default_branch":"main","last_synced_at":"2025-06-25T15:21:38.836Z","etag":null,"topics":["adjust-pg-extension"],"latest_commit_sha":null,"homepage":"","language":"Jinja","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/adjust.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-26T15:02:37.000Z","updated_at":"2025-06-25T14:06:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0d2cedf-fb63-4373-a520-5d02ba1767aa","html_url":"https://github.com/adjust/pg_type_template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adjust/pg_type_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_type_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_type_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_type_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_type_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjust","download_url":"https://codeload.github.com/adjust/pg_type_template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fpg_type_template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274880344,"owners_count":25367100,"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-12T02:00:09.324Z","response_time":60,"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":["adjust-pg-extension"],"created_at":"2024-11-16T16:14:42.138Z","updated_at":"2025-09-12T21:38:44.492Z","avatar_url":"https://github.com/adjust.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg_type_template\nAn extension template for generating a Postgres type\n\n# Usage\n\nTo work with `pg_type_template` it is necessary to prepare a model which will be\nused to generate a type extension. This model is passed to the `TypeTemplate`\nclass instance.\n\nHere is an example of such Python script (`example_type_templ.py`):\n\n```\nimport pg_type_template\n\nmodel = {\n    \"ext_name\": \"example_type\",\n    \"ext_version\": \"0.0.1\",\n    \"types\": [\n        {\n            \"type_name\": \"example_type\",\n            \"type_values\": [\n                { \"name\": \"enum 1\", \"value\": 60 },\n                { \"name\": \"enum 2\", \"value\": 120 },\n                { \"name\": \"enum 3\", \"value\": 180 },\n                { \"name\": \"unknown\", \"value\": 255 },\n            ]\n        }\n    ],\n    # optional value defaults \"GITHUB_TOKEN\"\n    \"github_action_token_name\": \"GITHUB_TOKEN\"\n}\ntempl = pg_type_template.TypeTemplate(model)\ntempl.render_to_dir(\".\")\n```\n\nTo install python package you can use a virtual environment:\n\n```\npython3 -m venv venv\nsource venv/bin/activate\n```\n\nAfter the script is defined run the following command:\n\n```\npip install git+ssh://git@github.com/adjust/pg_type_template.git\npython3 example_type_templ.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fpg_type_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjust%2Fpg_type_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fpg_type_template/lists"}