{"id":16781516,"url":"https://github.com/ppintosilva/anpr-mssql-client","last_synced_at":"2026-05-07T01:35:43.358Z","repository":{"id":50204033,"uuid":"107558827","full_name":"ppintosilva/anpr-mssql-client","owner":"ppintosilva","description":"A CLI for querying the ANPR SQL-Server Database","archived":false,"fork":false,"pushed_at":"2022-12-08T00:49:57.000Z","size":34,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T07:26:50.923Z","etag":null,"topics":["anpr","docker","mssql","python2","sql-query"],"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/ppintosilva.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}},"created_at":"2017-10-19T14:40:32.000Z","updated_at":"2024-01-25T05:40:34.000Z","dependencies_parsed_at":"2023-01-25T01:31:32.965Z","dependency_job_id":null,"html_url":"https://github.com/ppintosilva/anpr-mssql-client","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppintosilva%2Fanpr-mssql-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppintosilva%2Fanpr-mssql-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppintosilva%2Fanpr-mssql-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppintosilva%2Fanpr-mssql-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppintosilva","download_url":"https://codeload.github.com/ppintosilva/anpr-mssql-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933438,"owners_count":20370986,"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":["anpr","docker","mssql","python2","sql-query"],"created_at":"2024-10-13T07:43:13.160Z","updated_at":"2026-05-07T01:35:38.332Z","avatar_url":"https://github.com/ppintosilva.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anpr-mssql-client\n\nA command line interface for querying the [anpr-mssql-server](https://github.com/ppintosilva/anpr-mssql-server).\n\n## Requirements\n\n- Docker (and user added to `docker` group)\n- Python 3 (`pipenv` recommended)\n- An instance of the [anpr-mssql-server](https://github.com/ppintosilva/anpr-mssql-server) running on localhost or on other machine in the same network.\n\n## Steps\n\n- `$ pipenv install` + `$ pipenv shell` (or alternative virtualenv setup)\n- ```$ python client.py pull-image```\n- `$ export SQL_PASSWORD=YOUR_password_123`\n- Query away from a string or a file: ```$ python client.py query -i select_pie.tsql```\n\n## Template queries and usage examples\n\nYou can use Jinja2 templates with your tsql queries. Define the template keys in your `.sql` query file and then pass the values on the terminal using the `-k key value` option. See examples in the queries folder.\n\n\n**Get table names, number of rows and columns**\n\n```bash\npython client.py query -i queries/tables.sql\n```\n\n**Get all table names for a given table owner**\n\n```bash\npython client.py query -i queries/tables_by_owner.sql -k owner data\n```\n\n**Get column names for a given table**\n\n```bash\npython client.py query -i queries/columns.sql -k table Cameras\n```\n\n**Get data from table 'Cameras'**\n\n```bash\npython client.py query -i queries/cameras.sql\n```\n\n**Get number of observations per month and year**\n\n```bash\npython client.py query -i queries/npdata_rows_per_month.sql\n```\n\n**Get raw number plate data for a given time interval**\n\n```bash\npython client.py query -i queries/raw_npdata.sql -k start 2019-01-01 -k end 2019-02-01\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppintosilva%2Fanpr-mssql-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppintosilva%2Fanpr-mssql-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppintosilva%2Fanpr-mssql-client/lists"}