- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
This file contains hidden or 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
class HTTPSOnlyMiddleware: | |
""" | |
Override request.is_secure() to always return True. | |
Only use if you're **always** serving with HTTPS | |
**and** SECURE_PROXY_SSL_HEADER is not suitable for your setup. | |
""" | |
def __init__(self, get_response): | |
self.get_response = get_response |
This file contains hidden or 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
Gists are mini-repos. | |
* Add files. | |
* Clone | |
* Use that history. | |
* Share and comment. |
This file contains hidden or 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
Show hidden characters
{ | |
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | |
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | |
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | |
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | |
// Placeholders with the same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "scope": "javascript,typescript", |
This file contains hidden or 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
Last login: Mon Nov 28 15:49:38 on ttys002 | |
~ $ mkvirtualenv df-import-test | |
Using base prefix '/Users/carlton/.pyenv/versions/3.5.0' | |
New python executable in df-import-test/bin/python3.5 | |
Also creating executable in df-import-test/bin/python | |
Installing setuptools, pip, wheel...done. | |
(df-import-test)~ $ pip install Django djangorestframework django-filter | |
Collecting Django | |
Using cached Django-1.10.3-py2.py3-none-any.whl | |
Collecting djangorestframework |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
General Outline:
- About Third Party Packages
- How to create a Third Party Package
- Existing Third Party Packages
- Other Resources
Third Party Packages allow developers to share code that extends the functionality of Django REST framework, in order to support additional use-cases.
This file contains hidden or 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
#! /usr/bin/python | |
import fileinput | |
import json | |
if __name__ == "__main__": | |
jsonStr = '' | |
for a_line in fileinput.input(): | |
jsonStr = jsonStr + ' ' + a_line.strip() | |
jsonObj = json.loads(jsonStr) | |
print json.dumps(jsonObj, sort_keys=True, indent=2) |