Add license file and update README
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c256740
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 Antfin Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 14ad50d..bfd8748 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,79 @@
# rocketmq-python
+[![Build Status](https://travis-ci.com/messense/rocketmq-python.svg?branch=master)](https://travis-ci.com/messense/rocketmq-python)
+[![PyPI](https://img.shields.io/pypi/v/rocketmq.svg)](https://pypi.org/project/rocketmq)
+
RocketMQ Python client
+
+## Installation
+
+```bash
+pip install rocketmq
+```
+
+## Usage
+
+### Producer
+
+```python
+from rocketmq.client import Producer, Message
+
+producer = Producer('PID-XXX')
+producer.set_namesrv_domain('http://onsaddr-internet.aliyun.com/rocketmq/nsaddr4client-internet')
+producer.set_session_credentials('XXX', 'XXXX', 'ALIYUN')
+producer.start()
+
+msg = Message('YOUR-TOPIC')
+msg.set_keys('XXX')
+msg.set_tags('XXX')
+msg.set_body('XXXX')
+ret = producer.send_sync(msg)
+print(ret.status, ret.msg_id, ret.offset)
+producer.shutdown()
+```
+
+### PushConsumer
+
+```python
+import time
+
+from rocketmq.client import PushConsumer
+
+
+def callback(msg):
+ print(msg.id, msg.body)
+
+
+consumer = PushConsumer('CID_XXX')
+consumer.set_namesrv_domain('http://onsaddr-internet.aliyun.com/rocketmq/nsaddr4client-internet')
+consumer.set_session_credentials('XXX', 'XXXX', 'ALIYUN')
+consumer.subscribe('YOUR-TOPIC', callback)
+consumer.start()
+
+while True:
+ time.sleep(3600)
+
+consumer.shutdown()
+
+```
+
+### PullConsumer
+
+```python
+from rocketmq.client import PullConsumer
+
+
+consumer = PullConsumer('CID_XXX')
+consumer.set_namesrv_domain('http://onsaddr-internet.aliyun.com/rocketmq/nsaddr4client-internet')
+consumer.set_session_credentials('XXX', 'XXXX', 'ALIYUN')
+consumer.start()
+
+for msg in consumer.pull('YOUR-TOPIC'):
+ print(msg.id, msg.body)
+
+consumer.shutdown()
+```
+
+## License
+
+This work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file.