Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit d6483d8

Browse files
authored
optional dependencies (#108)
1 parent e806f2a commit d6483d8

4 files changed

Lines changed: 27 additions & 8 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ Python 3.6+
3939
$ pip3 install typesystem
4040
```
4141

42-
If you'd like you use the form rendering you'll also want to install `jinja2`.
42+
If you'd like you use the form rendering using `jinja2`:
4343

4444
```shell
45-
$ pip3 install jinja2
45+
$ pip3 install typesystem[jinja2]
4646
```
4747

48-
If you'd like you use the YAML tokenization you'll also want to install `pyyaml`.
48+
If you'd like you use the YAML tokenization using `pyyaml`:
4949

5050
```shell
51-
$ pip3 install pyyaml
51+
$ pip3 install typesystem[pyyaml]
5252
```
5353

5454
## Quickstart

docs/fields.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,12 @@ owner = typesystem.Reference(to=User, allow_null=True)
202202
**Arguments**:
203203

204204
* `to` - A schema class or field instance. **Required**
205+
206+
## Other data types
207+
208+
### UUID
209+
210+
Validates UUID in the format of 32 hexadecimal characters, separated by hyphens.
211+
For example `"cd11b0d7-d8b3-4b5c-8159-70f5c9ea96ab"`.
212+
213+
Returns `uuid.UUID` instances.

docs/index.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# TypeSystem
22

33
<p>
4-
<a href="https://travis-ci.org/encode/typesystem">
5-
<img src="https://travis-ci.org/encode/typesystem.svg?branch=master" alt="Build Status">
4+
<a href="https://github.com/encode/typesystem/actions">
5+
<img src="https://github.com/encode/typesystem/workflows/Test%20Suite/badge.svg" alt="Build Status">
66
</a>
77
<a href="https://codecov.io/gh/encode/typesystem">
88
<img src="https://codecov.io/gh/encode/typesystem/branch/master/graph/badge.svg" alt="Coverage">
@@ -33,10 +33,16 @@ Python 3.6+
3333
$ pip3 install typesystem
3434
```
3535

36-
If you'd like you use the form rendering you'll also want to install `jinja2`.
36+
If you'd like you use the form rendering using `jinja2`:
3737

3838
```shell
39-
$ pip3 install jinja2
39+
$ pip3 install typesystem[jinja2]
40+
```
41+
42+
If you'd like you use the YAML tokenization using `pyyaml`:
43+
44+
```shell
45+
$ pip3 install typesystem[pyyaml]
4046
```
4147

4248
## Quickstart

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def get_packages(package):
4141
packages=get_packages('typesystem'),
4242
package_data={'typesystem': ['py.typed', 'templates/forms/*.html']},
4343
install_requires=[],
44+
extras_require={
45+
"jinja2": ["jinja2"],
46+
"pyyaml": ["pyyaml"],
47+
},
4448
python_requires='>=3.6',
4549
classifiers=[
4650
'Development Status :: 3 - Alpha',

0 commit comments

Comments
 (0)