Skip to content

Commit 36784b6

Browse files
authored
added pip install piccolo[all] option (piccolo-orm#230)
* added `pip install piccolo[all]` option * tweak install docs * update README to mention piccolo[all] option
1 parent 77b3d27 commit 36784b6

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,27 @@ await b.remove().run()
7272

7373
Installing with PostgreSQL driver:
7474

75-
```
75+
```bash
7676
pip install 'piccolo[postgres]'
7777
```
7878

7979
Installing with SQLite driver:
8080

81-
```
81+
```bash
8282
pip install 'piccolo[sqlite]'
8383
```
8484

85+
Installing with all optional dependencies (easiest):
86+
87+
```bash
88+
pip install 'piccolo[all]'
89+
```
90+
8591
## Building a web app?
8692

8793
Let Piccolo scaffold you an ASGI web app, using Piccolo as the ORM:
8894

89-
```
95+
```bash
9096
piccolo asgi new
9197
```
9298

@@ -98,4 +104,6 @@ We have a handy page which shows the equivalent of [common Django queries in Pic
98104

99105
## Documentation
100106

101-
See [Read the docs](https://piccolo-orm.readthedocs.io/en/latest/piccolo/getting_started/index.html).
107+
Our documentation is on [Read the docs](https://piccolo-orm.readthedocs.io/en/latest/piccolo/getting_started/index.html).
108+
109+
We also have some great [tutorial videos on YouTube](https://www.youtube.com/channel/UCE7x5nm1Iy9KDfXPNrNQ5lA).

docs/src/piccolo/getting_started/installing_piccolo.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ Now install piccolo, ideally inside a `virtualenv <https://docs.python-guide.org
3030
# Optional: orjson for improved JSON serialisation performance
3131
pip install 'piccolo[orjson]'
3232
33-
# Optional: uvloop as default event loop instead of asyncio
34-
# If using Piccolo with Uvicorn, Uvicorn will set uvloop as
35-
# default event loop if installed
33+
# Optional: uvloop as the default event loop instead of asyncio
34+
# If using Piccolo with Uvicorn, Uvicorn will set uvloop as the default
35+
# event loop if installed
3636
pip install 'piccolo[uvloop]'
37+
38+
# If you just want Piccolo with all of it's functionality, you might prefer
39+
# to use this:
40+
pip install 'piccolo[all]'

setup.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4+
import itertools
45
import os
5-
from typing import List
6+
import typing as t
7+
68
from setuptools import find_packages, setup
79

810
from piccolo import __VERSION__ as VERSION
911

10-
1112
directory = os.path.abspath(os.path.dirname(__file__))
1213

1314
extras = ["orjson", "playground", "postgres", "sqlite", "uvloop"]
@@ -17,7 +18,7 @@
1718
LONG_DESCRIPTION = f.read()
1819

1920

20-
def parse_requirement(req_path: str) -> List[str]:
21+
def parse_requirement(req_path: str) -> t.List[str]:
2122
"""
2223
Parse requirement file.
2324
Example:
@@ -31,7 +32,7 @@ def parse_requirement(req_path: str) -> List[str]:
3132
return [i.strip() for i in contents.strip().split("\n")]
3233

3334

34-
def extras_require():
35+
def extras_require() -> t.Dict[str, t.List[str]]:
3536
"""
3637
Parse requirements in requirements/extras directory
3738
"""
@@ -41,6 +42,10 @@ def extras_require():
4142
os.path.join("extras", extra + ".txt")
4243
)
4344

45+
extra_requirements["all"] = [
46+
i for i in itertools.chain.from_iterable(extra_requirements.values())
47+
]
48+
4449
return extra_requirements
4550

4651

0 commit comments

Comments
 (0)