{"id":14949154,"url":"https://github.com/lpil/bucket","last_synced_at":"2026-01-03T02:05:30.281Z","repository":{"id":255433795,"uuid":"849365853","full_name":"lpil/bucket","owner":"lpil","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-22T16:52:07.000Z","size":77,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T12:54:46.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Gleam","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/lpil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-08-29T13:17:59.000Z","updated_at":"2025-02-22T16:52:11.000Z","dependencies_parsed_at":"2024-11-21T12:41:14.691Z","dependency_job_id":null,"html_url":"https://github.com/lpil/bucket","commit_stats":null,"previous_names":["lpil/bucket"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fbucket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fbucket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fbucket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fbucket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpil","download_url":"https://codeload.github.com/lpil/bucket/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243753990,"owners_count":20342537,"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":[],"created_at":"2024-09-24T05:00:36.393Z","updated_at":"2026-01-03T02:05:30.275Z","avatar_url":"https://github.com/lpil.png","language":"Gleam","funding_links":[],"categories":["Packages","Gleam"],"sub_categories":["SDKs"],"readme":"# bucket\n\nGleam S3 API client, suitable for AWS S3, Garage, Minio, Storj,\nBackblaze B2, Cloudflare R2, Ceph, Wasabi, and so on!\n\n[![Package Version](https://img.shields.io/hexpm/v/bucket)](https://hex.pm/packages/bucket)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/bucket/)\n\nThis package uses the _sans-io_ approach, meaning it does not send HTTP requests\nitself, instead it gives you functions for creating HTTP requests for and\ndecoding HTTP responses from an S3 API, and you send the requests with a HTTP\nclient of your choosing.\n\nThis HTTP client independence gives you full control over HTTP, and means this\nlibrary can be used on both the Erlang and JavaScript runtimes.\n\n```sh\ngleam add bucket@1\n```\n```gleam\nimport bucket\nimport bucket/get_object.{Found}\nimport gleam/bit_array\nimport gleam/http.{Https}\nimport gleam/io\nimport httpc\n\n/// This program downloads an object and prints the string contents.\n///\n/// It uses `let assert` to handle errors, but in a real program you'd most\n/// likely want to use pattern matching or the `gleam/result` module to handle\n/// the error values gracefully.\n///\npub fn main() {\n  let creds = bucket.credentials(\n    host: \"s3-api-host.example.com\",\n    access_key_id: \"YOUR_ACCESS_KEY\",\n    secret_access_key: \"YOUR_SECRET_ACCESS_KEY\",\n  )\n\n  // Create a HTTP request to download an object\n  let request =\n    get_object.request(bucket: \"my-bucket\", key: \"my/key.txt\")\n    |\u003e get_object.build(creds)\n\n  // Send the HTTP request\n  let assert Ok(response) = httpc.send_bits(request)\n\n  // Decode the response from the API\n  let assert Ok(Found(object)) = get_object.response(response)\n\n  // Print the string contents\n  let assert Ok(text) = bit_array.to_string(object)\n  io.println(text)\n}\n```\n\nThe following endpoints are supported:\n\n- [CreateBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)\n- [DeleteBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)\n- [DeleteObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)\n- [DeleteObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html)\n- [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)\n- [HeadBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html)\n- [HeadObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html)\n- [ListBuckets](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)\n- [ListObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)\n- [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)\n- [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)\n- [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)\n- [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)\n\nFurther documentation can be found at \u003chttps://hexdocs.pm/bucket\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fbucket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpil%2Fbucket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fbucket/lists"}