{"id":16920536,"url":"https://github.com/gacarrillor/pg2ili","last_synced_at":"2026-02-18T19:31:30.486Z","repository":{"id":89375055,"uuid":"224961615","full_name":"gacarrillor/pg2ili","owner":"gacarrillor","description":"Python script to import tables from a PostgreSQL/PostGIS SQL file to INTERLIS","archived":false,"fork":false,"pushed_at":"2024-09-09T16:28:45.000Z","size":178,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T17:49:21.609Z","etag":null,"topics":["gis","interlis","interoperability","ogc","postgis","postgresql","python","sql"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gacarrillor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-11-30T04:56:26.000Z","updated_at":"2024-09-09T16:28:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"670849fa-85b0-47fb-b1c7-0c669119e17f","html_url":"https://github.com/gacarrillor/pg2ili","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gacarrillor/pg2ili","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gacarrillor%2Fpg2ili","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gacarrillor%2Fpg2ili/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gacarrillor%2Fpg2ili/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gacarrillor%2Fpg2ili/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gacarrillor","download_url":"https://codeload.github.com/gacarrillor/pg2ili/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gacarrillor%2Fpg2ili/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29591895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T18:54:29.675Z","status":"ssl_error","status_checked_at":"2026-02-18T18:50:50.517Z","response_time":162,"last_error":"SSL_read: 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":["gis","interlis","interoperability","ogc","postgis","postgresql","python","sql"],"created_at":"2024-10-13T19:48:39.671Z","updated_at":"2026-02-18T19:31:30.205Z","avatar_url":"https://github.com/gacarrillor.png","language":"Python","readme":"# pg2ili\nPython script to import tables and relationships from a PostgreSQL/PostGIS SQL (DDL) file to [INTERLIS](https://www.interlis.ch/en).\n\n![pg2ili](https://user-images.githubusercontent.com/652785/70843347-9fe97f80-1dfe-11ea-9a18-3780fd41d965.png)\n\npg2ili was created for saving time when extracting (or reverse engineering) information about the structure of an existing physical model.\n\nIf you start from a PostgreSQL/PostGIS database and want to obtain an INTERLIS model from it, you can use pg2ili to get all your PG tables written as INTERLIS classes. Then you can open the obtained ili file in [UML/INTERLIS Editor](https://github.com/claeis/umleditor) and adjust your model, i.e., adding meta-attributes, adjusting numeric ranges, among others.\n\n**Usage:**\n\nGo to pgAdmin v3 or v4 and create a (SQL) plain backup of your database schema. Now go to a terminal and run:\n\n    python3 ./pg2ili.py /docs/backup.sql My_New_Model My_New_Topic \u003e /docs/my_model.ili\n\n\n**Examples:**\n\nSee the `tests/` folder for input and output examples.\n\n\n**Unit tests:**\n\nTo run the unit tests, open the project in PyCharm, open `tests.py` file and press `Ctrl + Shift + F10`.\n\nIndividual tests can be run by typing this in a console (from repo folder):\n\n    python3 -m unittest tests.tests.TestPG2ILI.test_sql13    \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgacarrillor%2Fpg2ili","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgacarrillor%2Fpg2ili","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgacarrillor%2Fpg2ili/lists"}