Skip to content

xujinheng/S3-Mock-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3-Mock-Server

Github All Releases GitHub License

Introduction

S3-Mock-Server is a PHP based server that implements Amazon S3 API.

Deployment

Download the file in php server:

curl -L https://github.com/xujinheng/S3-Mock-Server/releases/download/0.0.1/server-single-file.php -o server.php

Usage

import boto3
s3 = boto3.resource("s3", endpoint_url=<the place you put server.php>, 
                    aws_access_key_id=<any string>, aws_secret_access_key=<any string>)
s3.Bucket(<bucket name>).upload_file(<local file>, <object key>)
s3.Bucket(<bucket name>).download_file(<object key>, <local path>)

Check demo.ipynb for details.

Supported client:

Supported methods:

  • Buckets
    • Create
    • List
    • Delete
  • Objects
    • Create
    • List (prefix)
    • Download
    • Delete