From 935622783d7d331f8d6a84030995ef4ceae37a6d Mon Sep 17 00:00:00 2001 From: ebozduman Date: Wed, 22 May 2019 18:05:57 -0700 Subject: [PATCH] Build: Use README.md instead of README.rst (#763) --- README.rst | 207 ----------------------------------------------------- setup.py | 5 +- 2 files changed, 3 insertions(+), 209 deletions(-) delete mode 100644 README.rst diff --git a/README.rst b/README.rst deleted file mode 100644 index 2a33460a..00000000 --- a/README.rst +++ /dev/null @@ -1,207 +0,0 @@ -MinIO Python Library for Amazon S3 Compatible Cloud Storage |Gitter| -======== - -The MinIO Python Client SDK provides simple APIs to access any Amazon S3 -compatible object storage server. - -This quickstart guide will show you how to install the client SDK and -execute an example python program. For a complete list of APIs and -examples, please take a look at the `Python Client API -Reference `__ -documentation. - -This document assumes that you have a working -`Python `__ setup in place. - -Download from pip ------------------ - -.. code:: sh - - $ pip install minio - -Download from source --------------------- - -.. code:: sh - - $ git clone https://github.com/minio/minio-py - $ cd minio-py - $ python setup.py install - -Initialize MinIO Client ------------------------ - -You need four items in order to connect to MinIO object storage server. - -.. csv-table:: - :header: "Params", "Description" - :widths: 15, 30 - - "endpoint", "URL to object storage service." - "access_key", "Access key is like user ID that uniquely identifies your account." - "secret_key", "Secret key is the password to your account." - "secure", "Set this value to 'True' to enable secure (HTTPS) access." - - -.. code:: python - - from minio import Minio - from minio.error import ResponseError - - minioClient = Minio('play.min.io:9000', - access_key='Q3AM3UQ867SPQQA43P2F', - secret_key='zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', - secure=True) - -Quick Start Example - File Uploader ------------------------------------ - -This example program connects to a MinIO object storage server, makes a -bucket on the server and then uploads a file to the bucket. - -We will use the MinIO server running at https://play.min.io:9000 in -this example. Feel free to use this service for testing and development. -Access credentials shown in this example are open to the public. - -file-uploader.py -~~~~~~~~~~~~~~~~ - -.. code:: python - - # Import MinIO library. - from minio import Minio - from minio.error import ResponseError - - # Initialize minioClient with an endpoint and access/secret keys. - minioClient = Minio('play.min.io:9000', - access_key='Q3AM3UQ867SPQQA43P2F', - secret_key='zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', - secure=True) - - # Make a bucket with the make_bucket API call. - try: - minioClient.make_bucket("maylogs", location="us-east-1") - except BucketAlreadyOwnedByYou as err: - pass - except BucketAlreadyExists as err: - pass - except ResponseError as err: - raise - else: - # Put an object 'pumaserver_debug.log' with contents from 'pumaserver_debug.log'. - try: - minioClient.fput_object('maylogs', 'pumaserver_debug.log', '/tmp/pumaserver_debug.log') - except ResponseError as err: - print(err) - - -Run file-uploader -~~~~~~~~~~~~~~~~~ - -.. code:: bash - - $ python file_uploader.py - - $ mc ls play/maylogs/ - [2016-05-27 16:41:37 PDT] 12MiB pumaserver_debug.log - -API Reference -------------- - -The full API Reference is available here. `Complete API -Reference `__ - -API Reference : Bucket Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `make\_bucket `__ -- `list\_buckets `__ -- `bucket\_exists `__ -- `remove\_bucket `__ -- `list\_objects `__ -- `list\_incomplete\_uploads `__ -- `get\_bucket\_policy `__ -- `set\_bucket\_policy `__ - -API Reference : File Object Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `fput\_object `__ -- `fget\_object `__ - -API Reference : Object Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `get\_object `__ -- `get\_partial\_object `__ -- `put\_object `__ -- `stat\_object `__ -- `remove\_object `__ -- `remove\_incomplete\_upload `__ - -API Reference : Presigned Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `presigned\_get\_object `__ -- `presigned\_put_object `__ -- `presigned\_post\_policy `__ - -Full Examples -------------- - -Full Examples : Bucket Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `list\_buckets.py `__ -- `list\_objects.py `__ -- `bucket\_exists.py `__ -- `make\_bucket.py `__ -- `remove\_bucket.py `__ -- `list\_incomplete\_uploads.py `__ -- `remove\_incomplete\_upload.py `__ - -Full Examples : File Object Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `fput\_object.py `__ -- `fget\_object.py `__ - -Full Examples : Object Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `put\_object.py `__ -- `get\_object.py `__ -- `get\_partial\_object.py `__ -- `remove\_object.py `__ -- `stat\_object.py `__ - -Full Examples : Presigned Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `presigned\_get\_object.py `__ -- `presigned\_put\_object.py `__ -- `presigned\_post\_policy.py `__ - -Explore Further ---------------- - -- `Complete Documentation `__ -- `MinIO Python SDK API - Reference `__ - -Contribute ----------- - -`Contributors Guide <./CONTRIBUTING.md>`__ - -|PYPI| |Build Status| |Build status| - -.. |Gitter| image:: https://badges.gitter.im/Join%20Chat.svg - :target: https://gitter.im/MinIO/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge -.. |PYPI| image:: https://img.shields.io/pypi/v/minio.svg - :target: https://pypi.python.org/pypi/minio -.. |Build Status| image:: https://travis-ci.org/minio/minio-py.svg - :target: https://travis-ci.org/minio/minio-py -.. |Build status| image:: https://ci.appveyor.com/api/projects/status/1d05e6nvxcelmrak?svg=true - :target: https://ci.appveyor.com/project/harshavardhana/minio-py diff --git a/setup.py b/setup.py index e743e7bf..f46a6eb7 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) -with open('README.rst', 'r', 'utf-8') as f: +with open('README.md', 'r', 'utf-8') as f: readme = f.read() packages = [ @@ -60,6 +60,7 @@ download_url='https://github.com/minio/minio-py', author_email='dev@min.io', version=version, + long_description_content_type='text/markdown', package_dir={'minio': 'minio'}, packages=packages, install_requires=requires, @@ -79,6 +80,6 @@ 'Topic :: Software Development :: Libraries :: Python Modules', ], long_description=readme, - package_data={'': ['LICENSE', 'README.rst']}, + package_data={'': ['LICENSE', 'README.md']}, include_package_data=True, )