Metadata-Version: 1.1
Name: bottle-react
Version: 0.1.1
Summary: A microframework for Bottle+React projects.
Home-page: https://github.com/keredson/bottle-react
Author: Derek Anderson
Author-email: public@kered.org
License: UNKNOWN
Description: bottle-react
        ============
        
        Description
        -----------
        
        This library allows you to return react components from Bottle. It
        currently powers https://www.hvst.com/.
        
        Example
        -------
        
        Assume you have a normal JSX file ``hello_world.jsx``:
        
        .. code:: js
        
            var HelloWorld = React.createClass({
              render: function() {
                return (
                  <div className='hello_world'>
                    <h1>Hello {this.props.name}!</h1>
                    <div>
                      Thanks for trying bottle-react!
                    </div>
                  </div>
                );
              }
            })
            bottlereact._register('HelloWorld', HelloWorld)
        
        And some python code:
        
        .. code:: python
        
            app = bottle.Bottle()
            br = BottleReact(app)
        
            @app.get('/')
            def root():
              return br.render_html(
                br.HelloWorld({'name':'World'})
              )
        
        You will have a functioning bottle+react app.
        
        Install
        -------
        
        .. code:: python
        
            sudo pip install bottle-react
        
        Documentation
        -------------
        
        ``bottlereact.BottleReact()`` takes several keyword arguments, all of
        which are optional:
        
        +--------------+--------------+----------+
        | KW Argument  | Description  | Default  |
        +==============+==============+==========+
        | ``prod``     | Are we in    | False    |
        |              | production?  |          |
        |              | If so,       |          |
        |              | compile all  |          |
        |              | JSX into     |          |
        |              | pure         |          |
        |              | javascript.  |          |
        |              | Otherwise    |          |
        |              | serve the    |          |
        |              | raw JSX with |          |
        |              | the          |          |
        |              | babel-core   |          |
        |              | shim.        |          |
        +--------------+--------------+----------+
        | ``jsx_path`` | Where        | ``jsx``  |
        |              | bottle-react |          |
        |              | should       |          |
        |              | search for   |          |
        |              | JSX files.   |          |
        +--------------+--------------+----------+
        | ``asset_path | Where        | ``assets |
        | ``           | bottle-react | ``       |
        |              | should       |          |
        |              | search for   |          |
        |              | javascript/c |          |
        |              | ss/etc       |          |
        |              | files.       |          |
        +--------------+--------------+----------+
        | ``work_path` | Where        | ``/tmp/b |
        | `            | bottle-react | ottlerea |
        |              | outputs      | ct``     |
        |              | static js    |          |
        |              | files when   |          |
        |              | in           |          |
        |              | production   |          |
        |              | mode (if you |          |
        |              | want to      |          |
        |              | serve them   |          |
        |              | statically). |          |
        +--------------+--------------+----------+
        | ``jsx_path`` | Where        | ``jsx``  |
        |              | bottle-react |          |
        |              | should       |          |
        |              | search for   |          |
        |              | JSX files.   |          |
        +--------------+--------------+----------+
        | ``verbose``  | Verbose      | ``not pr |
        |              | mode.        | od``     |
        +--------------+--------------+----------+
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
