{"id":19245083,"url":"https://github.com/rxtoolkit/s3","last_synced_at":"2025-02-23T15:15:40.554Z","repository":{"id":214798812,"uuid":"348903763","full_name":"rxtoolkit/s3","owner":"rxtoolkit","description":"🪣 RXJS operators for working with AWS S3","archived":false,"fork":false,"pushed_at":"2024-02-16T18:39:22.000Z","size":487,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T10:02:32.647Z","etag":null,"topics":["aws","data-science","fp","functional-programming","observables","package","reactive-programming","rxjs","s3","s3-storage"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rxtoolkit.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}},"created_at":"2021-03-18T01:32:58.000Z","updated_at":"2024-01-02T15:50:03.000Z","dependencies_parsed_at":"2023-12-30T22:07:54.056Z","dependency_job_id":"7151f107-9d00-4d83-b80c-0854a989db1e","html_url":"https://github.com/rxtoolkit/s3","commit_stats":null,"previous_names":["rxtoolkit/s3"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fs3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fs3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fs3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fs3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rxtoolkit","download_url":"https://codeload.github.com/rxtoolkit/s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240331362,"owners_count":19784646,"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":["aws","data-science","fp","functional-programming","observables","package","reactive-programming","rxjs","s3","s3-storage"],"created_at":"2024-11-09T17:26:35.469Z","updated_at":"2025-02-23T15:15:40.386Z","avatar_url":"https://github.com/rxtoolkit.png","language":"JavaScript","readme":"# @rxtk/s3\n\u003e 🪣 RXJS operators for working with AWS S3\n\n```bash\nnpm i @rxtk/s3\n```\n\n```bash\nyarn add @rxtk/s3\n```\n\n## API\n\n### `fromS3File`\nDownloads a file to AWS S3 (as a stream).\n```js\nimport AWS from 'aws-sdk';\nimport {concat} from 'rxjs';\nimport {fromS3file} from '@rxtk/s3';\n\n// Download AWS S3 file as a stream of file chunks (Buffers)\nconst downloadParams = {\n  s3Bucket: 'my-fabulous-bucket',\n  s3Key: 'path/to/file/hello-world.json',\n  byteLength: 32000, // (Optional) Size of the download chunks. Defaults to 32000.\n  s3Client: new AWS.S3(), // (Optional) The s3 client to use\n  rawResponse: false, // (Optional) - expose raw S3 JSON responses. Defaults to false.\n};\nconst bufferChunk$ = fromS3File(downloadParams);\nbufferchunk$.subscribe(console.log);\n```\n\n### `toS3File`\nUploads a file to AWS S3 (as a stream).\n```js\nimport {concat} from 'rxjs';\nimport {toS3File} from '@rxtk/s3';\n\n// create a stream of file chunks\nconst chunk0 = Buffer.from('{\"hello\":');\nconst chunk1 = Buffer.from('\"world\"}');\nconst chunk$ = concat(chunk0, chunk1);\n\n// upload the chunks to an AWS S3 file\nconst uploadParams = {\n  s3Bucket: 'my-fabulous-bucket',\n  s3Key: 'path/to/file/hello-world.json',\n  contentType: 'application/json',\n};\nconst upload$ = chunk$.pipe(toS3File(uploadParams));\nupload$.subscribe(console.log);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxtoolkit%2Fs3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frxtoolkit%2Fs3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxtoolkit%2Fs3/lists"}