update installation steps to be consistent across documentation and readme

Signed-off-by: Harsha Narayana <harsha2k4@gmail.com>
This commit is contained in:
Harsha Narayana 2018-12-22 10:52:12 +05:30
parent 82f7f847ba
commit a80499c4b7
No known key found for this signature in database
GPG Key ID: 8AF211CB60D4B28C
3 changed files with 36 additions and 27 deletions

View File

@ -48,6 +48,18 @@ Sanic is developed `on GitHub <https://github.com/huge-success/sanic/>`_. We als
If you have a project that utilizes Sanic make sure to comment on the `issue <https://github.com/huge-success/sanic/issues/396>`_ that we use to track those projects!
Installation
------------
- ``pip3 install sanic``
To install sanic without uvloop or ujson using bash, you can provide either or both of these environmental variables
using any truthy string like `'y', 'yes', 't', 'true', 'on', '1'` and setting the ``SANIC_NO_X`` (``X`` = ``UVLOOP``/``UJSON``)
to true will stop that features installation.
- ``SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true pip install sanic``
Hello World Example
-------------------
@ -65,17 +77,6 @@ Hello World Example
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8000)
Installation
------------
- ``pip install sanic``
To install sanic without uvloop or ujson using bash, you can provide either or both of these environmental variables
using any truthy string like `'y', 'yes', 't', 'true', 'on', '1'` and setting the NO_X to true will stop that features
installation.
- ``SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true pip install sanic``
Documentation
-------------

View File

@ -25,21 +25,21 @@ Dependency Changes
effort required in managing the dependencies. Please make sure you have read and understood the following section of
the document that explains the way ``sanic`` manages dependencies inside the ``setup.py`` file.
+------------------------+-----------------------------------------------+----------------------------+
+------------------------+-----------------------------------------------+--------------------------------+
| Dependency Type | Usage | Installation |
+========================+===============================================+============================+
| requirements | Bare minimum dependencies required for sanic | pip3 install -e . |
+========================+===============================================+================================+
| requirements | Bare minimum dependencies required for sanic | ``pip3 install -e .`` |
| | to function | |
+------------------------+-----------------------------------------------+----------------------------+
| tests_require / | Dependencies required to run the Unit Tests | pip3 install -e '[.test]' |
+------------------------+-----------------------------------------------+--------------------------------+
| tests_require / | Dependencies required to run the Unit Tests | ``pip3 install -e '[.test]'`` |
| extras_require['test'] | for ``sanic`` | |
+------------------------+-----------------------------------------------+----------------------------+
| extras_require['dev'] | Additional Development requirements to add | pip3 install -e '[.dev]' |
+------------------------+-----------------------------------------------+--------------------------------+
| extras_require['dev'] | Additional Development requirements to add | ``pip3 install -e '[.dev]'`` |
| | contributing | |
+------------------------+-----------------------------------------------+----------------------------+
| extras_require['docs'] | Dependencies required to enable building and |pip3 install -e '[.docs]' |
+------------------------+-----------------------------------------------+--------------------------------+
| extras_require['docs'] | Dependencies required to enable building and | ``pip3 install -e '[.docs]'`` |
| | enhancing sanic documentation | |
+------------------------+-----------------------------------------------+----------------------------+
+------------------------+-----------------------------------------------+--------------------------------+
Running tests
-------------

View File

@ -7,7 +7,15 @@ syntax, so earlier versions of python won't work.
## 1. Install Sanic
```
python3 -m pip install sanic
pip3 install sanic
```
To install sanic without `uvloop` or `ujson` using bash, you can provide either or both of these environmental variables
using any truthy string like `'y', 'yes', 't', 'true', 'on', '1'` and setting the `SANIC_NO_X` (`X` = `UVLOOP`/`UJSON`)
to true will stop that features installation.
```bash
SANIC_NO_UVLOOP=true SANIC_NO_UJSON=true pip3 install sanic
```
## 2. Create a file called `main.py`