Skip to content

Commit 1a76d05

Browse files
committed
Move codegen, submodules, templategen to plotly-package directory
1 parent 3afb898 commit 1a76d05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2455
-2
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
*.pyc
3+
.ipynb_checkpoints/
4+
.ipynb_checkpoints/usage-checkpoint.ipynb
5+
6+
.ipynb_checkpoints/usage-checkpoint.ipynb
7+
8+
*node_modules*
9+
10+
*.pyc
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
chunked-requests
2+
================
3+
4+
A wrapper around Python's httplib for streaming, chunk-encoded HTTP requests. As used in the [Plotly-Python API](https://plot.ly/python/) for streaming, real-time graphing in the browser: [https://plot.ly/python/streaming](https://plot.ly/python/streaming).
5+
6+
### Quickly
7+
```python
8+
from chunked_requests import Stream
9+
10+
stream = Stream('127.0.0.1', 8080)
11+
12+
stream.write('some data')
13+
14+
# take a break, go on a walk
15+
16+
stream.write('some more data') # reconnects if disconnected
17+
18+
response = stream.close()
19+
```
20+
21+
See more in this IPython notebook: [http://nbviewer.ipython.org/github/chriddyp/chunked_requests/blob/master/usage.ipynb?create=1](http://nbviewer.ipython.org/github/chriddyp/chunked_requests/blob/master/usage.ipynb?create=1)
22+
23+
### Docs
24+
- `s = Stream(addr, port=80, headers={})`
25+
26+
Initializes a connection to `addr:port` with `headers`.
27+
28+
- `s.write(data, reconnect_on=(200, '', ))`
29+
30+
Write chunk-encoded data, and reconnect depending on the status code.
31+
32+
- `response = s.close()`
33+
34+
Close connection and return a HTTPResponse object
35+
36+
- `int s.maxtries`
37+
38+
Max number of times to attempt re-connecting before raising an error

plotly-package/submodules/chunked_requests/__init__.py

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . chunked_request import Stream

0 commit comments

Comments
 (0)