{"id":25858526,"url":"https://github.com/trendyol/openstack-swift-sdk","last_synced_at":"2025-10-14T05:21:46.583Z","repository":{"id":48108570,"uuid":"368480170","full_name":"Trendyol/openstack-swift-sdk","owner":"Trendyol","description":"Openstack Swift SDK","archived":false,"fork":false,"pushed_at":"2025-09-25T13:14:58.000Z","size":278,"stargazers_count":7,"open_issues_count":8,"forks_count":3,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-09-25T15:19:55.819Z","etag":null,"topics":["nodejs","openstack","swift","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Trendyol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-18T09:54:47.000Z","updated_at":"2024-10-29T03:08:15.000Z","dependencies_parsed_at":"2024-01-22T20:53:14.598Z","dependency_job_id":"bdc429b8-8478-4d25-8493-799511ad51d4","html_url":"https://github.com/Trendyol/openstack-swift-sdk","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Trendyol/openstack-swift-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fopenstack-swift-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fopenstack-swift-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fopenstack-swift-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fopenstack-swift-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trendyol","download_url":"https://codeload.github.com/Trendyol/openstack-swift-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fopenstack-swift-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018015,"owners_count":26086237,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["nodejs","openstack","swift","typescript"],"created_at":"2025-03-01T20:20:26.374Z","updated_at":"2025-10-14T05:21:46.570Z","avatar_url":"https://github.com/Trendyol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Openstack Swift SDK\n\nWelcome to the Openstack Swift SDK! This SDK allows you to interact with Openstack Swift, a highly available, distributed, and consistent object storage system. With this SDK, you can easily manage and manipulate your data stored in Openstack Swift.\n\n## Features\n\n- Authentication with Openstack Swift using application credentials.\n- CRUD operations on containers and objects.\n- Upload and download objects.\n- Manage metadata of containers and objects.\n- List objects in a container with various filters.\n\n## Installation\n\nTo install the SDK, use npm:\n\n```bash\nnpm install @trendyol-js/openstack-swift-sdk\n```\n\n## Usage\n\nHere is a quick guide on how to use the Openstack Swift SDK.\n\n### Configuration\n\nFirst, set up your Openstack Swift configuration. You can do this by setting environment variables or by directly passing the configuration object.\n\n```typescript\nimport { SwiftClientConfiguration } from '@trendyol-js/openstack-swift-sdk';\n\nconst config = new SwiftClientConfiguration();\nconfig.authEndpoint = 'https://your-openstack-auth-endpoint';\nconfig.swiftEndpoint = 'https://your-openstack-swift-endpoint';\nconfig.credentialId = 'your-application-credential-id';\nconfig.secret = 'your-application-credential-secret';\n```\n\n### Initialization\n\nCreate an instance of SwiftClient using the configuration.\n\n```typescript\nimport { SwiftClient } from '@trendyol-js/openstack-swift-sdk';\n\nconst swiftClient = new SwiftClient(config);\n```\n\n### Authentication\n\nThe SDK handles authentication for you. It obtains a token and automatically includes it in your requests.\n\n### Operations\n\n#### Download an Object\n\nDownload an object from a container.\n\n```typescript\nconst container = 'my-container';\nconst path = 'my-object';\n\nconst downloadResponse = await swiftClient.download(container, path);\n\nif (downloadResponse instanceof DownloadResponse) {\n  const stream = downloadResponse.data;\n  // Process the stream\n} else {\n  console.log('Object not found');\n}\n```\n\n#### Upload an Object\n\nUpload an object to a container.\n\n```typescript\nimport { Readable } from 'stream';\n\nconst container = 'my-container';\nconst path = 'my-object';\nconst stream = Readable.from('Hello, Openstack Swift!');\n\nawait swiftClient.upload(container, path, stream);\n```\n\n#### List Objects\n\nList objects in a container with a prefix and limit.\n\n```typescript\nconst container = 'my-container';\nconst prefix = 'my-prefix';\nconst limit = 10;\n\nconst objects = await swiftClient.list(container, prefix, limit);\n\nobjects.forEach(obj =\u003e {\n  console.log(`Object: ${obj.name}, Size: ${obj.bytes}`);\n});\n```\n\n#### Get Container Metadata\n\nGet metadata of a container.\n\n```typescript\nconst container = 'my-container';\n\nconst metadata = await swiftClient.getContainerMetadata(container);\n\nif (metadata instanceof ContainerMetaResponse) {\n  console.log(`Size: ${metadata.size}, Last Modified: ${metadata.lastModified}`);\n} else {\n  console.log('Container not found');\n}\n```\n\n#### Get Object Metadata\n\nGet metadata of an object.\n\n```typescript\nconst container = 'my-container';\nconst path = 'my-object';\n\nconst metadata = await swiftClient.getMetadata(container, path);\n\nif (metadata instanceof ObjectMetaResponse) {\n  console.log(`Size: ${metadata.size}, Content Type: ${metadata.contentType}`);\n} else {\n  console.log('Object not found');\n}\n```\n\n#### Delete an Object\n\nDelete an object from a container.\n\n```typescript\nconst container = 'my-container';\nconst path = 'my-object';\n\nconst success = await swiftClient.delete(container, path);\n\nif (success) {\n  console.log('Object deleted successfully');\n} else {\n  console.log('Failed to delete object');\n}\n```\n\n## Development\n\n### Scripts\n\n- `test`: Run tests using Jest.\n- `build`: Compile TypeScript to JavaScript.\n- `lint`: Run TypeScript and ESLint checks.\n- `lint:fix`: Automatically fix linting issues.\n\n### Pre-commit Hooks\n\nHusky is used to run lint-staged, which formats code with Prettier before committing.\n\n## Contributing\n\nWe welcome contributions to the Openstack Swift SDK. Please fork the repository and submit pull requests with your improvements.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n\n---\n\nWe hope you find this SDK useful! If you encounter any issues or have suggestions, please open an issue on our [GitHub repository](https://github.com/Trendyol/openstack-swift-sdk). Happy coding!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendyol%2Fopenstack-swift-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrendyol%2Fopenstack-swift-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendyol%2Fopenstack-swift-sdk/lists"}