Skip to content

Commit 0bfabb9

Browse files
author
D5YhtS0ofv
committed
Just show deploy to Bluemix button
1 parent 5a7f806 commit 0bfabb9

File tree

2 files changed

+10
-80
lines changed

2 files changed

+10
-80
lines changed

README.md

Lines changed: 5 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,6 @@
1-
IBM Internet of Things Foundation for Python
2-
============================================
1+
##Bluemix Deployment
2+
The sample is specifically designed to be deployed into Bluemix. The application requires a binding to both an instance of the Internet of Things service & Cloudant services.
33

4-
Python module for interacting with the [IBM Internet of Things Foundation](https://internetofthings.ibmcloud.com).
5-
6-
* [Python 3.4](https://www.python.org/downloads/release/python-343/)
7-
* [Python 2.7](https://www.python.org/downloads/release/python-279/)
8-
9-
Note: Support for MQTT over SSL requires at least Python v2.7.9 or v3.4, and openssl v1.0.1
10-
11-
12-
Dependencies
13-
------------
14-
* [paho-mqtt](https://pypi.python.org/pypi/paho-mqtt)
15-
* [iso8601](https://pypi.python.org/pypi/iso8601)
16-
* [pytz](https://pypi.python.org/pypi/pytz)
17-
* [requests](https://pypi.python.org/pypi/requests)
18-
19-
20-
Installation
21-
------------
22-
Install the latest version of the library with pip
23-
```
24-
[root@localhost ~]# pip install ibmiotf
25-
```
26-
27-
28-
Uninstall
29-
---------
30-
Uninstalling the module is simple.
31-
```
32-
[root@localhost ~]# pip uninstall ibmiotf
33-
```
34-
35-
Migrating from v0.0.x to v0.1.x
36-
-------------------------------
37-
There is a significant change between the 0.0.x releases and 0.1.x that will require changes to client code. Now that the library properly supports multiple
38-
message formats you will want to update calls to deviceClient.publishEvent, appClient.publishEvent and appClient.publishCommand to also supply the desired message format.
39-
40-
Sample code v0.0.9:
41-
```python
42-
deviceOptions = {"org": organization, "type": deviceType, "id": deviceId, "auth-method": authMethod, "auth-token": authToken}
43-
deviceCli = ibmiotf.device.Client(deviceOptions)
44-
myData = { 'hello' : 'world', 'x' : x}
45-
deviceCli.publishEvent(event="greeting", data=myData)
46-
```
47-
48-
Sample code v0.1.1:
49-
```python
50-
deviceOptions = {"org": organization, "type": deviceType, "id": deviceId, "auth-method": authMethod, "auth-token": authToken}
51-
deviceCli = ibmiotf.device.Client(deviceOptions)
52-
myData = { 'hello' : 'world', 'x' : x}
53-
deviceCli.publishEvent(event="greeting", msgFormat="json", data=myData)
54-
```
55-
56-
Also, as part of this change, events and commands sent as format "json" will not be assumed to meet the [IOTF JSON Payload Specification](https://docs.internetofthings.ibmcloud.com/messaging/payload.html#iotf-json-payload-specification). The default client behaviour will be to parse commands and events with format "json" as a generic JSON object only. Only messages sent as format "json-iotf" will default to being decoded in this specification. This can be easily changed
57-
with the following code.
58-
59-
```python
60-
import ibmiotf.device
61-
from ibmiotf.codecs import jsonIotfCodec
62-
63-
deviceOptions = {"org": organization, "type": deviceType, "id": deviceId, "auth-method": authMethod, "auth-token": authToken}
64-
deviceCli = ibmiotf.device.Client(deviceOptions)
65-
# Revert to v0.0.x parsing for json messages -- assume all JSON events and commands use the IOTF JSON payload specification
66-
deviceCli.setMessageEncoderModule('json', jsonIotfCodec)
67-
```
68-
69-
70-
Documentation
71-
-------------
72-
* [Device Client](https://docs.internetofthings.ibmcloud.com/libraries/python_cli_for_devices.html)
73-
* [Application Client](https://docs.internetofthings.ibmcloud.com/libraries/python_cli_for_apps.html)
4+
[![Deploy to Bluemix]
5+
(https://bluemix.net/deploy/button.png)]
6+
(https://bluemix.net/deploy?repository=https://github.com/D5YhtS0ofv/iot-python)

manifest.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@ declared-services:
55
iot-python-iotf-service:
66
label: iotf-service
77
plan: iotf-service-free
8-
8+
99
applications:
1010
- services:
1111
- iot-python-cloudantNoSQLDB
1212
- iot-python-iotf-service
1313
host: iot-python
1414
name: iot-python
15-
disk: 64M
16-
command: setup.py
17-
path: .
18-
domain: mybluemix.net
19-
memory: 64M
20-
instances: 1
21-
15+
- command: python server.py
16+
domain: mybluemix.net
17+
path: samples/bluemixZoneDemo
18+
instances: 1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy