- Official Python Job Board https://www.python.org/jobs/
-
pycoders newsletter job board: http://www.pythonjobshq.com
-
Python Jobs http://www.pythonjobs.com
class Organization(models.Model): | |
name = models.CharField() | |
class Project(models.Model): | |
name = models.CharField() | |
users = models.ManyToManyField('User', related_name='users', through='UserProjectPermission') | |
organization = models.ForeignKey(Organization) | |
from inspect import iscoroutinefunction, isawaitable | |
import sys | |
from collections import deque | |
# NOTE: this follows the contextlib.ExitStack implementation | |
class _BaseExitStack: | |
def __init__(self): |
pycoders newsletter job board: http://www.pythonjobshq.com
Python Jobs http://www.pythonjobs.com
import requests3 | |
import trio | |
session = requests3.AsyncSession() | |
async def main(): | |
async def request(): | |
r = await session.get('http://127.0.0.1:8000/uuid', stream=False) |
import aiohttp | |
import asyncio | |
async def get_body(url): | |
response = await aiohttp.request('GET', url) | |
raw_html = await response.read() | |
return raw_html | |
async def main(): | |
# run them sequentially (but the loop can do other stuff in the meanwhile) |
Over the last 3 years or so I've helped a bunch of companies, small and large, switch to Django. As part of that, I've done a lot of teaching Django (and Python) to people new to the platform (and language). I'd estimate I've trained something around 200-250 people so far. These aren't people new to programming — indeed, almost all of them are were currently employed as software developers — but they were new to Python, or to Django, or to web development, or all three.
In doing so, I've observed some patterns about what works and what doesn't. Many (most) of the failings have been my own pedagogical failings, but as I've honed my coursework and my skill I'm seeing, time and again, certain ways that Django makes itself difficult to certain groups of users.
This document is my attempt at organizing some notes around what ways different groups struggle. It's not particularly actionable — I'm not making any arguments about what Django should or shouldn't do (at least
import csv | |
from collections import defaultdict | |
from rest_framework.renderers import * | |
from StringIO import StringIO | |
class CSVRenderer(BaseRenderer): | |
""" | |
Renderer which serializes to CSV | |
""" |
from rest_framework import serializers | |
class HyperlinkedIdentityField(serializers.HyperlinkedIdentityField): | |
""" | |
This is a performance wrapper for HyperlinkedIdentityField. | |
We save a ton of time by not calling reverse potentially | |
thousands of times per request. | |
""" | |
def __init__(self, *args, **kwargs): |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).