Skip to content

Commit

Permalink
update installation steps to be consistent across documentation and r…
Browse files Browse the repository at this point in the history
…eadme

Signed-off-by: Harsha Narayana <[email protected]>
  • Loading branch information
harshanarayana committed Dec 23, 2018
1 parent f2f4f89 commit 64a99af
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 27 deletions.
23 changes: 12 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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
-------------------

Expand All @@ -28,17 +40,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
-------------
Expand Down
30 changes: 15 additions & 15 deletions docs/sanic/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 . |
| | to function | |
+------------------------+-----------------------------------------------+----------------------------+
| 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]' |
| | contributing | |
+------------------------+-----------------------------------------------+----------------------------+
| extras_require['docs'] | Dependencies required to enable building and |pip3 install -e '[.docs]' |
| | enhancing sanic documentation | |
+------------------------+-----------------------------------------------+----------------------------+
+------------------------+-----------------------------------------------+--------------------------------+
| Dependency Type | Usage | Installation |
+========================+===============================================+================================+
| 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]'`` |
| extras_require['test'] | for ``sanic`` | |
+------------------------+-----------------------------------------------+--------------------------------+
| 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]'`` |
| | enhancing sanic documentation | |
+------------------------+-----------------------------------------------+--------------------------------+

Running tests
-------------
Expand Down
10 changes: 9 additions & 1 deletion docs/sanic/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ 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`

```python
Expand Down

0 comments on commit 64a99af

Please sign in to comment.