Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- If installed but no wish to use it set HUG_USE_UJSON=0 environmental variable
- Loading branch information
Dani Gonzalez
committed
Oct 23, 2017
1 parent
aec8a6f
commit 366a15a
Showing
7 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import os | ||
|
||
HUG_USE_UJSON = bool(os.environ.get('HUG_USE_UJSON', 1)) | ||
try: | ||
if HUG_USE_UJSON: | ||
import ujson as json | ||
else: | ||
import json | ||
except ImportError: | ||
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ tox==2.7.0 | |
wheel==0.29.0 | ||
pytest-xdist==1.14.0 | ||
marshmallow==2.6.0 | ||
ujson==1.35 |