{"id":13714620,"url":"https://github.com/iwpnd/starlite-tile38","last_synced_at":"2025-05-07T03:30:49.003Z","repository":{"id":37934559,"uuid":"451360445","full_name":"iwpnd/starlite-tile38","owner":"iwpnd","description":"Starlite application showcasing tile38","archived":true,"fork":false,"pushed_at":"2023-10-31T14:08:38.000Z","size":492,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T23:03:05.425Z","etag":null,"topics":["api","crud","pyle38","spatial","starlite","tile38"],"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/iwpnd.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":"2022-01-24T07:30:41.000Z","updated_at":"2024-11-25T09:52:30.000Z","dependencies_parsed_at":"2024-01-14T21:14:19.313Z","dependency_job_id":"ea79db4e-4178-4648-8d0a-0120a43f40c1","html_url":"https://github.com/iwpnd/starlite-tile38","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fstarlite-tile38","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fstarlite-tile38/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fstarlite-tile38/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwpnd%2Fstarlite-tile38/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iwpnd","download_url":"https://codeload.github.com/iwpnd/starlite-tile38/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252806361,"owners_count":21807193,"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":["api","crud","pyle38","spatial","starlite","tile38"],"created_at":"2024-08-03T00:00:34.298Z","updated_at":"2025-05-07T03:30:48.719Z","avatar_url":"https://github.com/iwpnd.png","language":"Python","funding_links":[],"categories":["Examples"],"sub_categories":["Minimal"],"readme":"\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eStarlite-Tile38\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Showcase using Tile38 via pyle38 in a Starlite application.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/iwpnd/starlite-tile38/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/iwpnd/starlite-tile38/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003e\u003ch2 style=\"display: inline-block\"\u003eTable of Contents\u003c/h2\u003e\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\nShowcase of using [Tile38](https://github.com/tidwall/tile38) with [Pyle38](https://github.com/iwpnd/pyle38) in a [Starlite](https://github.com/starlite-api/starlite)\napplication. Can be used as is, or be extended upon with other methods in the [pyle38 repertoire](https://github.com/iwpnd/pyle38#commands) of commands.\n\n### Built With\n\n-   [Starlite](https://github.com/starlite-api/starlite)\n-   [Pyle38](https://github.com/iwpnd/pyle38)\n-   [Tile38](https://github.com/tidwall/tile38)\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\n### Installation\n\n1. Clone and install\n    ```sh\n    git clone https://github.com/iwpnd/starlite-tile38.git\n    poetry install\n    ```\n2. Setup environment\n    ```sh\n    mv .env.dist .env\n    ```\n3. Start your local stack\n    ```python\n    poe up\n    ```\n4. Test it!\n    ```sh\n    poe test\n    ```\n\n## Usage\n\nOnce the application is started you can checkout and interact with it via on [localhost:8001/schema/redoc](http://localhost:8001/schema/redoc).\n\nOr you can use it with [http](https://httpie.io/)/[curl](https://curl.se/):\n\n### Create a vehicle\n\n```sh\necho '{ \"data\": { \"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [13.37, 52.25]}, \"properties\": {\"id\": \"truck\"}}}' \\\n      | http post http://localhost:8001/vehicles\n\n\u003e {data:\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[13.37, 52.25]},\"properties\":{\"id\":\"truck\"}}\n```\n\n### Get vehicle by id\n```sh\nhttp get http://localhost:8001/vehicles/truck\n\n\u003e {data:\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[13.37, 52.25]},\"properties\":{\"id\":\"truck\"}}\n```\n\n### Get all vehicles\n```\nhttp get http://localhost:8001/vehicles\n\n\u003e { data: [\"type\":\"Feature\",\"geometry\":{\"type\": \"Point\", \"coordinates\": [13.37, 52.25]},\"properties\":{\"id\":\"truck\"}]}\n```\n\n### Get vehicles within radius\n```\nhttp get http://localhost:8001/search?lat=13.37\u0026lon=52.25\u0026radius=1000\n\n\u003e { data: [\"type\":\"Feature\",\"geometry\":{\"type\": \"Point\", \"coordinates\": [13.37, 52.25]},\"properties\":{\"id\":\"truck\"}]}\n```\n\n\nOr you use it with [httpx](https://www.python-httpx.org/)/[requests](https://docs.python-requests.org/en/master/):\n\n```python\nimport httpx\n\nvehicle = {\n    \"type\": \"Feature\",\n    \"geometry\": {\"type\": \"Point\", \"coordinates\": [13.37, 52.25]},\n    \"properties\": {\"id\": \"truck\"},\n}\n\n# store a vehicle\nr = httpx.post(\n      url=\"http://localhost:8001/vehicles\",\n      json={\"data\": vehicle}\n      )\n\nprint(r.json())\n\u003e { data: [\"type\":\"Feature\",\"geometry\":{\"type\": \"Point\", \"coordinates\": [13.37, 52.25]},\"properties\":{\"id\":\"truck\"}]}\n\n# get a vehicle\nr = httpx.get(\n      url=\"http://localhost:8001/vehicles/truck\",\n      )\n\nprint(r.json())\n\n\u003e {\"data\": {\"type\":\"Feature\",\"geometry\": {\"coordinates\": [13.37,52.25],\"type\": \"Point\"},\"properties\": {\"id\": \"truck\"}}}\n```\n\nYou get the idea. And can use the rest.\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nBenjamin Ramser - [@imwithpanda](https://twitter.com/imwithpanda) - ahoi@iwpnd.pw  \nProject Link: [https://github.com/iwpnd/starlite-tile38](https://github.com/iwpnd/starlite-tile38)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwpnd%2Fstarlite-tile38","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiwpnd%2Fstarlite-tile38","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwpnd%2Fstarlite-tile38/lists"}