{"id":28867153,"url":"https://github.com/minio/minio-cpp","last_synced_at":"2025-08-20T03:55:15.313Z","repository":{"id":37957508,"uuid":"418833979","full_name":"minio/minio-cpp","owner":"minio","description":"MinIO C++ Client SDK for Amazon S3 Compatible Cloud Storage","archived":false,"fork":false,"pushed_at":"2025-02-11T16:54:31.000Z","size":871,"stargazers_count":177,"open_issues_count":17,"forks_count":66,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-06-20T11:53:25.399Z","etag":null,"topics":["aws","aws-s3","cpp","minio","minio-client","minio-server","storage"],"latest_commit_sha":null,"homepage":"https://minio-cpp.min.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minio.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}},"created_at":"2021-10-19T08:21:20.000Z","updated_at":"2025-06-19T20:56:46.000Z","dependencies_parsed_at":"2024-09-17T21:57:01.035Z","dependency_job_id":"989841ab-26d6-4911-932d-0c3900724e95","html_url":"https://github.com/minio/minio-cpp","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/minio/minio-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minio","download_url":"https://codeload.github.com/minio/minio-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minio%2Fminio-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271262059,"owners_count":24728976,"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-08-20T02:00:09.606Z","response_time":69,"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":["aws","aws-s3","cpp","minio","minio-client","minio-server","storage"],"created_at":"2025-06-20T11:41:25.833Z","updated_at":"2025-08-20T03:55:15.299Z","avatar_url":"https://github.com/minio.png","language":"C++","readme":"# MinIO C++ Client SDK for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Sourcegraph](https://sourcegraph.com/github.com/minio/minio-cpp/-/badge.svg)](https://sourcegraph.com/github.com/minio/minio-cpp?badge) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/minio/minio-cpp/blob/master/LICENSE)\n\nMinIO C++ SDK is Simple Storage Service (aka S3) client to perform bucket and object operations to any Amazon S3 compatible object storage service.\n\nFor a complete list of APIs and examples, please take a look at the [MinIO C++ Client API Reference](https://minio-cpp.min.io/)\n\n## Build Requirements\n\n* [cmake](https://cmake.org/) 3.10 or higher.\n* [vcpkg](https://vcpkg.io/en/index.html) package manager.\n* A working C++ compiler that supports at least C++17.\n\n## Installation via `vcpkg`\n\nMinIO C++ client SDK can be installed via `vcpkg` package manager:\n\n```bash\n$ vcpkg install minio-cpp\n```\n\nTypically `minio-cpp` will be part of dependencies specified in `vcpkg.json` file:\n\n```json\n{\n  \"$schema\": \"https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json\",\n  \"name\": \"your-project\",\n  \"version\": \"0.0.1\",\n  \"dependencies\": [\n    { \"name\": \"minio-cpp\" }\n  ]\n}\n```\n\n## Using `minio-cpp` with cmake\n\nMinIO C++ cliend SDK can be consumed as a dependency in CMakeLists.txt, the following can be used as an example:\n\n```cmake\ncmake_minimum_required(VERSION 3.10)\n\nproject(miniocpp_example LANGUAGES C CXX)\n\n# This will try to find miniocpp package and all its dependencies.\nfind_package(miniocpp REQUIRED)\n\n# Create an executable called miniocpp-example:\nadd_executable(miniocpp-example example.cpp)\n\n# Link the executable to miniocpp and all its dependencies:\ntarget_link_libraries(miniocpp-example PRIVATE miniocpp::miniocpp)\n\n# Make sure you are using at least C++17:\ntarget_compile_features(miniocpp-example PUBLIC cxx_std_17)\n```\n\nNote that `miniocpp::miniocpp` is a cmake imported target, which contains all the instructions necessary to use `minio-cpp` library from your cmake projet file.\n\n## Hacking minio-cpp\n\nIn order to run minio-cpp tests and examples, you can do the following assuming `VCPKG_ROOT` points to a valid `vcpkg` installation:\n\n```bash\n$ git clone https://github.com/minio/minio-cpp\n$ cd minio-cpp\n$ ${VCPKG_ROOT}/vcpkg install\n$ cmake . -B build/Debug -DCMAKE_BUILD_TYPE=Debug -DMINIO_CPP_TEST=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake\n$ cmake --build ./build/Debug\n```\n\nNote that cmake also supports multi-configuration generators. Multi-configuration generators don't use `CMAKE_BUILD_TYPE` during configure time. For example a Visual Studio project can be setup the following way:\n\n```bash\n$ git clone https://github.com/minio/minio-cpp\n$ cd minio-cpp\n$ ${VCPKG_ROOT}/vcpkg install\n$ cmake . -B build -DMINIO_CPP_TEST=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake\n$ cmake --build ./build --config Debug\n```\n\nThe examples above assumed that you have `vcpkg` already installed and you have a `VCPKG_ROOT` environment variable set. This is common if you use `vcpkg` to handle dependencies of multiple projects as only a single installation of `vcpkg` is required in that case. If you don't have `vcpkg` installed and you only want to use it to test `minio-cpp`, it's possible to install it locally like this:\n\n```bash\n$ git clone https://github.com/minio/minio-cpp\n$ cd minio-cpp\n$ git clone https://github.com/microsoft/vcpkg.git\n$ ./vcpkg/bootstrap-vcpkg.sh\n$ ./vcpkg/vcpkg install\n$ cmake . -B ./build/Debug -DCMAKE_BUILD_TYPE=Debug -DMINIO_CPP_TEST=ON -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake\n$ cmake --build ./build/Debug\n```\n\nWe recommend the setup with `VCPKG_ROOT` for development. In that case there is a `configure.sh` script, that can be used to create both Debug and Release projects:\n\n```bash\n$ git clone https://github.com/minio/minio-cpp\n$ cd minio-cpp\n$ ./configure.sh -DMINIO_CPP_TEST=ON\n```\n\n## Example:: file-uploader.cc\n\n```c++\n#include \u003cminiocpp/client.h\u003e\n\nint main(int argc, char* argv[]) {\n  // Create S3 base URL.\n  minio::s3::BaseUrl base_url(\"play.min.io\");\n\n  // Create credential provider.\n  minio::creds::StaticProvider provider(\n      \"Q3AM3UQ867SPQQA43P2F\", \"zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG\");\n\n  // Create S3 client.\n  minio::s3::Client client(base_url, \u0026provider);\n  std::string bucket_name = \"asiatrip\";\n\n  // Check 'asiatrip' bucket exist or not.\n  bool exist;\n  {\n    minio::s3::BucketExistsArgs args;\n    args.bucket = bucket_name;\n\n    minio::s3::BucketExistsResponse resp = client.BucketExists(args);\n    if (!resp) {\n      std::cout \u003c\u003c \"unable to do bucket existence check; \" \u003c\u003c resp.Error()\n                \u003c\u003c std::endl;\n      return EXIT_FAILURE;\n    }\n\n    exist = resp.exist;\n  }\n\n  // Make 'asiatrip' bucket if not exist.\n  if (!exist) {\n    minio::s3::MakeBucketArgs args;\n    args.bucket = bucket_name;\n\n    minio::s3::MakeBucketResponse resp = client.MakeBucket(args);\n    if (!resp) {\n      std::cout \u003c\u003c \"unable to create bucket; \" \u003c\u003c resp.Error() \u003c\u003c std::endl;\n      return EXIT_FAILURE;\n    }\n  }\n\n  // Upload '/home/user/Photos/asiaphotos.zip' as object name\n  // 'asiaphotos-2015.zip' to bucket 'asiatrip'.\n  minio::s3::UploadObjectArgs args;\n  args.bucket = bucket_name;\n  args.object = \"asiaphotos-2015.zip\";\n  args.filename = \"/home/user/Photos/asiaphotos.zip\";\n\n  minio::s3::UploadObjectResponse resp = client.UploadObject(args);\n  if (!resp) {\n    std::cout \u003c\u003c \"unable to upload object; \" \u003c\u003c resp.Error() \u003c\u003c std::endl;\n    return EXIT_FAILURE;\n  }\n\n  std::cout \u003c\u003c \"'/home/user/Photos/asiaphotos.zip' is successfully uploaded as \"\n            \u003c\u003c \"object 'asiaphotos-2015.zip' to bucket 'asiatrip'.\"\n            \u003c\u003c std::endl;\n\n  return EXIT_SUCCESS;\n}\n```\n\n## License\n\nThis SDK is distributed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0), see [LICENSE](https://github.com/minio/minio-cpp/blob/master/LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminio%2Fminio-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminio%2Fminio-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminio%2Fminio-cpp/lists"}