We gave this talk as the opening keynote speech at PyCon Singapore. The theme of the talk is that most complex projects begin from humble origins. That you should create your own projects, sharing your knowledge and expertise.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
How to Write a Popular Python Library by Accident
1. How to Write a
Popular Python
Library by
Accident
Daniel Roy Greenfeld
Audrey Roy Greenfeld
Thursday Keynote Speech
June 23, 2016
2. How to Write a
Popular Python
Library by
Accident
Daniel Roy Greenfeld
Audrey Roy Greenfeld
Thursday Keynote Speech
June 23, 2016
3. @audreyr
@pydanny
About Us
Daniel Roy Greenfeld Audrey Roy Greenfeld
Met at PyCon US 2010
Married December 2013
Open Source Developers
Engineer & Principal, Cartwheel Web Engineer & Principal, Cartwheel Web
11. @audreyr
@pydanny
package
I don’t know
how to do it
I’m not
creative enough
I don’t have
enough experience
I’m not
a visionaryNonsense!
But Isn’t Releasing
Packages Hard?
34. @audreyr
@pydanny
class cached_property(object):
"""
A property that is only computed once per instance and then replaces itself
with an ordinary attribute. Deleting the attribute resets the property.
Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f5
""" # noqa
def __init__(self, func):
self.__doc__ = getattr(func, '__doc__')
self.func = func
def __get__(self, obj, cls):
if obj is None:
return self
value = obj.__dict__[self.func.__name__] = self.func(obj)
return value
Started at 9 lines of code
Now has 131 lines of code
Story of cached-property
91. @audreyr
@pydanny
• Flask
• Pyramid
• Tornado
• Bottle
• Web2py
• cherrypy
• web.py
• Falcon
• Bluebreem
• Turbogears
• Google App Engine
• Or write your own!
Django doesn’t meet your needs?
Use another web framework
92. @audreyr
@pydanny
youDjango doesn’t meet your needs?
Use another web framework
• Flask
• Pyramid
• Tornado
• Bottle
• Web2py
• cherrypy
• web.py
• Falcon
• Bluebreem
• Turbogears
• Google App Engine
• Or write your own!
(Bold items were written as Django alternatives)
99. @audreyr
@pydanny
Matplotlib
• Created in 2002 to solve a major problem:
• Epilepsy causes seizures
• Some children don’t respond to the
medications. They need brain surgery
by John Hunter
Story told to us by Fernando Perez of IPython/Jupyter,
John’s close friend and collaborator.
106. @audreyr
@pydanny
Matplotlib
The birth of
• John Hunter originally offered his plotting code to
Fernando Perez as a patch (contribution) to IPython
• Fernando Perez liked it but had to focus on finishing his
grad thesis
• John turned that code into matplotlib
109. @audreyr
@pydanny
project
• They are minor fixes or enhancements
• They fit the project’s needs/goals
Contribute changes to
existing projects if:
110. @audreyr
@pydanny
Start a new project if:
• No other project does what you need
• You’ve tried the other options already
• You feel that it will give you:
• Less resistance
• More freedom to do what you want
113. @audreyr
@pydanny
Daniel Roy Greenfeld Audrey Roy Greenfeld
Engineer & Principal, Cartwheel Web Engineer & Principal, Cartwheel Web
Met at PyCon US 2010
Married December 2013
Open Source Developers