ContinuumIO/blaze — pull request #830 by mrocklin (2014-11-11 20:31:15+00:00)
Title: Server full datashape

Along with recent improvements to h5py and sql, blaze server is now a first class citizen.

Blaze now interacts with the entire server, not just single datasets on that server. This should improve discoverability.

The uri API is fully backwards compatible. The internal API is not (so if you were using Client objects before things will now break on you.) (@hhuuggoo I think this affects you)

### Server

```python
In [1]: from blaze import *

In [2]: df = DataFrame({'a': range(10000), 'b': range(10000)})

In [3]: iris = resource('blaze/examples/data/iris.csv')

In [4]: server = Server({'df': df, 'iris': iris})

In [5]: server.run()
* Running on http://127.0.0.1:6363/
```

### Client

```python

In [1]: from blaze import *

In [2]: # d = Data('blaze://localhost::iris') # used to specify dataset name
In [2]: d = Data('blaze://localhost') # now can just point to the server directly

In [3]: d
Out[3]:

In [4]: d.dshape # full datashape of everything in the server
Out[4]:
dshape("""{
df: 10000 * {a: int64, b: int64},
iris: var * {
sepal_length: float64,
sepal_width: float64,
petal_length: float64,
petal_width: float64,
species: string
}
}""")

In [5]: d.iris # item access to get to actual datasets
Out[5]:
sepal_length sepal_width petal_length petal_width species
0 5.1 3.5 1.4 0.2 Iris-setosa
1 4.9 3.0 1.4 0.2 Iris-setosa
2 4.7 3.2 1.3 0.2 Iris-setosa
3 4.6 3.1 1.5 0.2 Iris-setosa
4 5.0 3.6 1.4 0.2 Iris-setosa
5 5.4 3.9 1.7 0.4 Iris-setosa
6 4.6 3.4 1.4 0.3 Iris-setosa
7 5.0 3.4 1.5 0.2 Iris-setosa
8 4.4 2.9 1.4 0.2 Iris-setosa
9 4.9 3.1 1.5 0.1 Iris-setosa
...

```