{"id":26404493,"url":"https://github.com/nsls2/tiled-tutorial-sessions","last_synced_at":"2026-01-29T00:03:15.142Z","repository":{"id":229877228,"uuid":"777314214","full_name":"NSLS2/tiled-tutorial-sessions","owner":"NSLS2","description":"Notes from NSLS2 Tiled Tutorials","archived":false,"fork":false,"pushed_at":"2024-03-26T17:37:14.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T13:29:04.883Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/NSLS2.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}},"created_at":"2024-03-25T16:06:27.000Z","updated_at":"2024-03-25T16:06:28.000Z","dependencies_parsed_at":"2024-03-26T18:53:57.503Z","dependency_job_id":null,"html_url":"https://github.com/NSLS2/tiled-tutorial-sessions","commit_stats":null,"previous_names":["nsls2/tiled-tutorial-sessions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NSLS2/tiled-tutorial-sessions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSLS2%2Ftiled-tutorial-sessions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSLS2%2Ftiled-tutorial-sessions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSLS2%2Ftiled-tutorial-sessions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSLS2%2Ftiled-tutorial-sessions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NSLS2","download_url":"https://codeload.github.com/NSLS2/tiled-tutorial-sessions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSLS2%2Ftiled-tutorial-sessions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28856911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"ssl_error","status_checked_at":"2026-01-28T22:56:00.861Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2025-03-17T16:36:10.190Z","updated_at":"2026-01-29T00:03:15.128Z","avatar_url":"https://github.com/NSLS2.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tiled Tutorial Sessions\n\n## This Week\n\n\n- Using [HTTPie](https://httpie.io/) commandline tool to explore the Tiled HTTP API\n\nInstall and use HTTPie.\n\n```bash\npip install httpie\nhttp https://example.com\n```\n\nStart a Tiled server.\n\n```bash\ntiled serve catalog --temp --api-key secret\n```\n\nPublic server landing page (HTML)\n\n```bash\nhttp :8000\n```\n\nPublic server info (JSON)\n\n```bash\nhttp :8000/api/v1  # missing trailing /\nhttp :8000/api/v1/\n```\n\nThe `/metadata` and `/search` endpoints\n\n```bash\nhttp :8000/api/v1/metadata/   # missing authentication\nhttp :8000/api/v1/metadata/ 'Authorization:Apikey secret'\nhttp :8000/api/v1/search/ 'Authorization:Apikey secret'\n```\n\nUsing the Python client to upload some data:\n\n```python=\nfrom tiled.client import from_uri\nimport dask.array\nimport dask.dataframe\nimport numpy\nimport pandas\n\nc = from_uri('http://localhost:8000', api_key='secret')\n\narr = numpy.ones((5, 5))\nc.write_array(arr, key=\"x\")\ndf = pandas.DataFrame({\"A\": [1,2,3], \"B\": [4,5,6], \"C\": [7,8,9]})\nc.write_dataframe(df, key=\"y\")\nz = c.create_container(\"z\")\nz.write_array([1], key=\"stuff\")\nz.write_array([10, 20, 30], key=\"things\")\nda = dask.array.from_array(numpy.mgrid[:5, :5][0] * 10 + numpy.mgrid[:5, :5][1], chunks=(3, 3))\nc.write_array(da, key='da')\nddf = dask.dataframe.from_pandas(df, npartitions=2)\nc.write_dataframe(ddf, key='ddf')\n```\n\nUse `/search` to list contents.\n\n```bash\nhttp :8000/api/v1/search/ 'Authorization:Apikey secret' \n```\n\n```bash\npip install jq\nhttp :8000/api/v1/search/ 'Authorization:Apikey secret' | jq .data[].id\nhttp :8000/api/v1/search/ 'Authorization:Apikey secret' | jq .data[].links.self\nhttp :8000/api/v1/search/z 'Authorization:Apikey secret' | jq .data[].id\n```\n\nDescribe an array.\n\n```\nhttp :8000/api/v1/metadata/x 'Authorization:Apikey secret'\n```\n\nFetch array data.\n\n```bash\nhttp :8000/api/v1/array/full/x 'Authorization:Apikey secret'\n```\n\nRequest a non-default format.\n\n```bash\nhttp :8000/api/v1/array/full/x 'Authorization:Apikey secret' 'Accept:text/csv'\nhttp ':8000/api/v1/array/full/x?format=text/csv' 'Authorization:Apikey secret'\nhttp ':8000/api/v1/array/full/x?format=csv' 'Authorization:Apikey secret'\n```\n\n```bash\nhttp :8000/api/v1/array/full/x 'Authorization:Apikey secret' 'Accept:nonsense'\n```\n\nSlice.\n\n```bash\nhttp ':8000/api/v1/array/full/x?slice=:3' 'Authorization:Apikey secret' 'Accept:text/csv'\nhttp ':8000/api/v1/array/full/x?slice=:,:3' 'Authorization:Apikey secret' 'Accept:text/csv'\n```\n\nUse the block endpoint.\n\n```bash!\n# See the full array in one request.\nhttp ':8000/api/v1/array/full/da' 'Authorization:Apikey secret' 'Accept:text/csv'\n# Request individual blocks.\nhttp ':8000/api/v1/array/block/da?block=0,0' 'Authorization:Apikey secret' 'Accept:text/csv'\nhttp ':8000/api/v1/array/block/da?block=0,1' 'Authorization:Apikey secret' 'Accept:text/csv'\nhttp ':8000/api/v1/array/block/da?block=1,0' 'Authorization:Apikey secret' 'Accept:text/csv'\nhttp ':8000/api/v1/array/block/da?block=0,0' 'Authorization:Apikey secret' 'Accept:text/csv'\n# Slice within a block.\nhttp ':8000/api/v1/array/block/da?block=0,0\u0026slice=1:,1:' 'Authorization:Apikey secret' 'Accept:text/csv'\n```\n\nDescribe a table.\n\n```bash\nhttp ':8000/api/v1/metadata/y' 'Authorization:Apikey secret'\n```\n\nFetch tabular data.\n\n```bash=\nhttp ':8000/api/v1/table/full/y' 'Authorization:Apikey secret' 'Accept:text/csv'\nhttp ':8000/api/v1/table/full/y?column=A' 'Authorization:Apikey secret' 'Accept:text/csv'\n http ':8000/api/v1/table/full/y?column=A\u0026column=B' 'Authorization:Apikey secret' 'Accept:text/csv'\n ```\n\nFetch tabular data by partition:\n\n```bash=\nhttp ':8000/api/v1/table/partition/ddf?partition=0' 'Authorization:Apikey secret' 'Accept:text/csv'\nhttp ':8000/api/v1/table/partition/ddf?partition=1' 'Authorization:Apikey secret' 'Accept:text/csv'\n# Combine with column selection\n http ':8000/api/v1/table/partition/ddf?partition=1\u0026column=A' 'Authorization:Apikey secret' 'Accept:text/csv'\n```\n\n\n## Previously on...\n\n### 2024-03-15\n\n- Registration\n- Data Sources\n\n### 2024-03-07 \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsls2%2Ftiled-tutorial-sessions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsls2%2Ftiled-tutorial-sessions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsls2%2Ftiled-tutorial-sessions/lists"}