{"id":18003958,"url":"https://github.com/simon987/ws_bucket_client","last_synced_at":"2025-04-04T09:41:55.811Z","repository":{"id":80438306,"uuid":"174758006","full_name":"simon987/ws_bucket_client","owner":"simon987","description":"Python client for https://github.com/simon987/ws_bucket","archived":false,"fork":false,"pushed_at":"2019-06-01T18:08:33.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T20:18:20.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simon987.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}},"created_at":"2019-03-09T23:40:13.000Z","updated_at":"2019-06-01T18:08:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba8f2b38-f4d7-4429-9e7b-1bc7860f419c","html_url":"https://github.com/simon987/ws_bucket_client","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/simon987%2Fws_bucket_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon987%2Fws_bucket_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon987%2Fws_bucket_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon987%2Fws_bucket_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon987","download_url":"https://codeload.github.com/simon987/ws_bucket_client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157078,"owners_count":20893202,"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-10-30T00:13:01.860Z","updated_at":"2025-04-04T09:41:55.787Z","avatar_url":"https://github.com/simon987.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CodeFactor](https://www.codefactor.io/repository/github/simon987/ws_bucket/badge)](https://www.codefactor.io/repository/github/simon987/ws_bucket)\n![GitHub](https://img.shields.io/github/license/simon987/ws_bucket_client.svg)\n\n# ws_bucket_client\nPython client for [ws_bucket](https://github.com/simon987/ws_bucket)\n\n## Usage (Library)\n\n```bash\ngit submodule add https://github.com/simon987/ws_bucket_client\npython -m pip install -r ws_bucket_client/requirements.txt\n```\n\nIn your project\n\n```python\nimport datetime\nfrom ws_bucket_client.api import WsBucketApi\n\nWSB_API = \"http://exemple-api-url/\"\nWSB_SECRET = \"exemple_secret\"  # Set to None for non-administrative usage\n    \nws_bucket = WsBucketApi(WSB_API, WSB_SECRET)\n\n# Allocate bucket (Requires secret)\nws_bucket.allocate(\n    token=\"aj8209x48m\",\n    file_name=\"tmp_file.ndjson\",\n    max_size=1024 * 1024,\n    upload_hook=\"rclone copy $1 my_gdrive:/wsb_tmp \u0026\u0026 rm $1\",\n    to_dispose_date=int(datetime.datetime.now().timestamp()) + 4000\n  )\n\n# Get bucket data\nws_bucket.read(token=\"aj8209x48m\")\n\n# Upload data to bucket, will trigger upload_hook\nwith open(\"my_file.ndjson\", \"rb\") as f:\n    ws_bucket.upload(token=\"aj8209x48m\", stream=f, max_size=100000)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon987%2Fws_bucket_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon987%2Fws_bucket_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon987%2Fws_bucket_client/lists"}