SlideShare a Scribd company logo
1 of 12
Download to read offline
Share your code with the
Python world by

creating pip packages
Hannes Hapke

1/28/2014 @PDXPython
Do you have a great project
and want to share it with 

the Python world?
Example at renooble.com
>> Development of PyZillow
Step 1: Share your code in public repo
Github creates a license file automatically
Step 2: Create helpful support files
• Create your tests
• Create __version__.py

VERSION = '0.2.2'

• Create README.txt or README.md

==================
pyzillow 0.2.2
==================
README
------
...
Step 3: Create a setup.pyimport os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from __version__ import VERSION
setup(
name='pyzillow',
version=VERSION,
author='Hannes Hapke',
author_email='hannes@renooble.com',
url='https://github.com/hanneshapke/pyzillow',
download_url='https://github.com/hanneshapke/pyzillow/archive/master.zip',
description='Python interface for Zillow's API. Currently supporting
GetDeepSearchResults and GetUpdatedPropertyDetails API.',
long_description=open(os.path.join(os.path.dirname(__file__), 'README.txt'),
'r').read(),
py_modules=['pyzillow', 'pyzillowerrors', '__version__'],
provides=['pyzillow'],
requires=['requests'],
install_requires=['requests >= 2.2.0'],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Financial and Insurance Industry',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'License :: OSI Approved :: MIT License',
'Topic :: Internet',
'Topic :: Internet :: WWW/HTTP',
],
keywords='zillow real estate rental xml api address zipcode',
license='MIT',
)
https://pypi.python.org/

pypi?:action=list_classifiers
Step 4: Register your package with PyPI
$ python setup.py register



PyPI asks you to create a new account 

or use your credentials
Step 5: Upload your package to PyPI
$ python setup.py sdist upload



Voila, your package is now available to the 

Python world!
$ pip install YOUR_PACKAGE
Use your Github README.md as README
found at 

https://coderwall.com/p/qawuyq
try:
import pypandoc
long_description =
pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
long_description = ''
https://wiki.python.org/moin/CheeseShopTutorial

Check out Python Wheel
Why?
PEP 376 compliant install
http://pythonwheels.com
https://pypi.python.org/pypi/wheel
Run 

`python setup.py sdist bdist_wheel upload`
@hanneshapke

hanneshapke.github.io
github.com/hanneshapke 

Portland, 2014


More Related Content

What's hot

Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub ActionsKnoldus Inc.
 
Git, github and the hacktober fest
Git, github and the hacktober festGit, github and the hacktober fest
Git, github and the hacktober festUtkarshRaj83
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub ActionsBo-Yi Wu
 
Intro to Github Actions @likecoin
Intro to Github Actions @likecoinIntro to Github Actions @likecoin
Intro to Github Actions @likecoinWilliam Chong
 
Scalable Deployment Architectures with TYPO3 Surf, Git and Jenkins
Scalable Deployment Architectures with TYPO3 Surf, Git and JenkinsScalable Deployment Architectures with TYPO3 Surf, Git and Jenkins
Scalable Deployment Architectures with TYPO3 Surf, Git and Jenkinsmhelmich
 
Get Ur Git On: Introduction and getting started with Github
Get Ur Git On: Introduction and getting started with GithubGet Ur Git On: Introduction and getting started with Github
Get Ur Git On: Introduction and getting started with GithubChristine O'Connell
 
Berlin Apache Con EU Airflow Workshops
Berlin Apache Con EU Airflow WorkshopsBerlin Apache Con EU Airflow Workshops
Berlin Apache Con EU Airflow WorkshopsJarek Potiuk
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GITGhadiAlGhosh
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 
Git,Github,How to host using Github
Git,Github,How to host using GithubGit,Github,How to host using Github
Git,Github,How to host using GithubSujata Regoti
 
GitFlow, SourceTree and GitLab
GitFlow, SourceTree and GitLabGitFlow, SourceTree and GitLab
GitFlow, SourceTree and GitLabShinu Suresh
 
Task1 Have to create/launch Application using Terraform
Task1 Have to create/launch Application using TerraformTask1 Have to create/launch Application using Terraform
Task1 Have to create/launch Application using TerraformSatwikaGunishetty
 

What's hot (20)

Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Github
GithubGithub
Github
 
Git, github and the hacktober fest
Git, github and the hacktober festGit, github and the hacktober fest
Git, github and the hacktober fest
 
Git within RStudio
Git within RStudioGit within RStudio
Git within RStudio
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Intro to Github Actions @likecoin
Intro to Github Actions @likecoinIntro to Github Actions @likecoin
Intro to Github Actions @likecoin
 
Scalable Deployment Architectures with TYPO3 Surf, Git and Jenkins
Scalable Deployment Architectures with TYPO3 Surf, Git and JenkinsScalable Deployment Architectures with TYPO3 Surf, Git and Jenkins
Scalable Deployment Architectures with TYPO3 Surf, Git and Jenkins
 
Get Ur Git On: Introduction and getting started with Github
Get Ur Git On: Introduction and getting started with GithubGet Ur Git On: Introduction and getting started with Github
Get Ur Git On: Introduction and getting started with Github
 
Overview of github
Overview of githubOverview of github
Overview of github
 
Berlin Apache Con EU Airflow Workshops
Berlin Apache Con EU Airflow WorkshopsBerlin Apache Con EU Airflow Workshops
Berlin Apache Con EU Airflow Workshops
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Git,Github,How to host using Github
Git,Github,How to host using GithubGit,Github,How to host using Github
Git,Github,How to host using Github
 
GitHub Presentation
GitHub PresentationGitHub Presentation
GitHub Presentation
 
Git101
Git101Git101
Git101
 
Get to know Git
Get to know GitGet to know Git
Get to know Git
 
GitFlow, SourceTree and GitLab
GitFlow, SourceTree and GitLabGitFlow, SourceTree and GitLab
GitFlow, SourceTree and GitLab
 
Task1 Have to create/launch Application using Terraform
Task1 Have to create/launch Application using TerraformTask1 Have to create/launch Application using Terraform
Task1 Have to create/launch Application using Terraform
 
DIY Java & Kubernetes
DIY Java & KubernetesDIY Java & Kubernetes
DIY Java & Kubernetes
 

Similar to Share your code with the Python world by
 creating pip packages

Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesLarry Cai
 
First python project
First python projectFirst python project
First python projectNeetu Jain
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingHenry Schreiner
 
Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Yuriy Senko
 
Run Python on windows
Run Python on windowsRun Python on windows
Run Python on windowsSitthykun LY
 
Tools for maintaining an open source project
Tools for maintaining an open source projectTools for maintaining an open source project
Tools for maintaining an open source projectAll Things Open
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Codemotion
 
10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftwareWilliam Hart
 
6_getting__started_with_python.pdf
6_getting__started_with_python.pdf6_getting__started_with_python.pdf
6_getting__started_with_python.pdfmaheshrawal2006
 
getting started with python6 (1).pdf
getting  started with python6 (1).pdfgetting  started with python6 (1).pdf
getting started with python6 (1).pdfSuyashsingh992747
 
Python + STIX = Awesome
Python + STIX = AwesomePython + STIX = Awesome
Python + STIX = Awesomestixproject
 
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHubAIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHubNhi Nguyen
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Henry Schreiner
 
Getting started with python.pdf
Getting started with python.pdfGetting started with python.pdf
Getting started with python.pdfAbhinavBawane
 
Serving Pull Requests with Jenkins
Serving Pull Requests with JenkinsServing Pull Requests with Jenkins
Serving Pull Requests with JenkinsSeth Goings
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Pantheon
 

Similar to Share your code with the Python world by
 creating pip packages (20)

Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
 
First python project
First python projectFirst python project
First python project
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
 
Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)
 
Run Python on windows
Run Python on windowsRun Python on windows
Run Python on windows
 
Software Instructions
Software InstructionsSoftware Instructions
Software Instructions
 
Tools for maintaining an open source project
Tools for maintaining an open source projectTools for maintaining an open source project
Tools for maintaining an open source project
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
 
10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware
 
6_getting__started_with_python.pdf
6_getting__started_with_python.pdf6_getting__started_with_python.pdf
6_getting__started_with_python.pdf
 
getting started with python6 (1).pdf
getting  started with python6 (1).pdfgetting  started with python6 (1).pdf
getting started with python6 (1).pdf
 
Python + STIX = Awesome
Python + STIX = AwesomePython + STIX = Awesome
Python + STIX = Awesome
 
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHubAIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 
Python Lecture 0
Python Lecture 0Python Lecture 0
Python Lecture 0
 
Getting started with python.pdf
Getting started with python.pdfGetting started with python.pdf
Getting started with python.pdf
 
Serving Pull Requests with Jenkins
Serving Pull Requests with JenkinsServing Pull Requests with Jenkins
Serving Pull Requests with Jenkins
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
 
Pythonpresent
PythonpresentPythonpresent
Pythonpresent
 

More from Hannes Hapke

PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoHannes Hapke
 
Introduction to Convolutional Neural Networks
Introduction to Convolutional Neural NetworksIntroduction to Convolutional Neural Networks
Introduction to Convolutional Neural NetworksHannes Hapke
 
Introduction to Neural Networks - Perceptron
Introduction to Neural Networks - PerceptronIntroduction to Neural Networks - Perceptron
Introduction to Neural Networks - PerceptronHannes Hapke
 
PyDX Presentation about Python, GeoData and Maps
PyDX Presentation about Python, GeoData and MapsPyDX Presentation about Python, GeoData and Maps
PyDX Presentation about Python, GeoData and MapsHannes Hapke
 
Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSHannes Hapke
 
Python Ecosystem for Beginners - PyCon Uruguay 2013
Python Ecosystem for Beginners - PyCon Uruguay 2013Python Ecosystem for Beginners - PyCon Uruguay 2013
Python Ecosystem for Beginners - PyCon Uruguay 2013Hannes Hapke
 

More from Hannes Hapke (6)

PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
Introduction to Convolutional Neural Networks
Introduction to Convolutional Neural NetworksIntroduction to Convolutional Neural Networks
Introduction to Convolutional Neural Networks
 
Introduction to Neural Networks - Perceptron
Introduction to Neural Networks - PerceptronIntroduction to Neural Networks - Perceptron
Introduction to Neural Networks - Perceptron
 
PyDX Presentation about Python, GeoData and Maps
PyDX Presentation about Python, GeoData and MapsPyDX Presentation about Python, GeoData and Maps
PyDX Presentation about Python, GeoData and Maps
 
Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJS
 
Python Ecosystem for Beginners - PyCon Uruguay 2013
Python Ecosystem for Beginners - PyCon Uruguay 2013Python Ecosystem for Beginners - PyCon Uruguay 2013
Python Ecosystem for Beginners - PyCon Uruguay 2013
 

Recently uploaded

Phase noise transfer functions.pptx
Phase noise transfer      functions.pptxPhase noise transfer      functions.pptx
Phase noise transfer functions.pptxSaiGouthamSunkara
 
Mohs Scale of Hardness, Hardness Scale.pptx
Mohs Scale of Hardness, Hardness Scale.pptxMohs Scale of Hardness, Hardness Scale.pptx
Mohs Scale of Hardness, Hardness Scale.pptxKISHAN KUMAR
 
cloud computing notes for anna university syllabus
cloud computing notes for anna university syllabuscloud computing notes for anna university syllabus
cloud computing notes for anna university syllabusViolet Violet
 
Basic Principle of Electrochemical Sensor
Basic Principle of  Electrochemical SensorBasic Principle of  Electrochemical Sensor
Basic Principle of Electrochemical SensorTanvir Moin
 
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Sean Meyn
 
Vertical- Machining - Center - VMC -LMW-Machine-Tool-Division.pptx
Vertical- Machining - Center - VMC -LMW-Machine-Tool-Division.pptxVertical- Machining - Center - VMC -LMW-Machine-Tool-Division.pptx
Vertical- Machining - Center - VMC -LMW-Machine-Tool-Division.pptxLMW Machine Tool Division
 
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxUNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxrealme6igamerr
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesDIPIKA83
 
Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Bahzad5
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxjasonsedano2
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchrohitcse52
 
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docxSUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docxNaveenVerma126
 
Test of Significance of Large Samples for Mean = µ.pptx
Test of Significance of Large Samples for Mean = µ.pptxTest of Significance of Large Samples for Mean = µ.pptx
Test of Significance of Large Samples for Mean = µ.pptxHome
 
Technology Features of Apollo HDD Machine, Its Technical Specification with C...
Technology Features of Apollo HDD Machine, Its Technical Specification with C...Technology Features of Apollo HDD Machine, Its Technical Specification with C...
Technology Features of Apollo HDD Machine, Its Technical Specification with C...Apollo Techno Industries Pvt Ltd
 
sdfsadopkjpiosufoiasdoifjasldkjfl a asldkjflaskdjflkjsdsdf
sdfsadopkjpiosufoiasdoifjasldkjfl a asldkjflaskdjflkjsdsdfsdfsadopkjpiosufoiasdoifjasldkjfl a asldkjflaskdjflkjsdsdf
sdfsadopkjpiosufoiasdoifjasldkjfl a asldkjflaskdjflkjsdsdfJulia Kaye
 

Recently uploaded (20)

Phase noise transfer functions.pptx
Phase noise transfer      functions.pptxPhase noise transfer      functions.pptx
Phase noise transfer functions.pptx
 
Lecture 4 .pdf
Lecture 4                              .pdfLecture 4                              .pdf
Lecture 4 .pdf
 
Mohs Scale of Hardness, Hardness Scale.pptx
Mohs Scale of Hardness, Hardness Scale.pptxMohs Scale of Hardness, Hardness Scale.pptx
Mohs Scale of Hardness, Hardness Scale.pptx
 
cloud computing notes for anna university syllabus
cloud computing notes for anna university syllabuscloud computing notes for anna university syllabus
cloud computing notes for anna university syllabus
 
Basic Principle of Electrochemical Sensor
Basic Principle of  Electrochemical SensorBasic Principle of  Electrochemical Sensor
Basic Principle of Electrochemical Sensor
 
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
 
Litature Review: Research Paper work for Engineering
Litature Review: Research Paper work for EngineeringLitature Review: Research Paper work for Engineering
Litature Review: Research Paper work for Engineering
 
計劃趕得上變化
計劃趕得上變化計劃趕得上變化
計劃趕得上變化
 
Vertical- Machining - Center - VMC -LMW-Machine-Tool-Division.pptx
Vertical- Machining - Center - VMC -LMW-Machine-Tool-Division.pptxVertical- Machining - Center - VMC -LMW-Machine-Tool-Division.pptx
Vertical- Machining - Center - VMC -LMW-Machine-Tool-Division.pptx
 
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxUNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display Devices
 
Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptx
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
 
Lecture 2 .pptx
Lecture 2                            .pptxLecture 2                            .pptx
Lecture 2 .pptx
 
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docxSUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
 
Test of Significance of Large Samples for Mean = µ.pptx
Test of Significance of Large Samples for Mean = µ.pptxTest of Significance of Large Samples for Mean = µ.pptx
Test of Significance of Large Samples for Mean = µ.pptx
 
Technology Features of Apollo HDD Machine, Its Technical Specification with C...
Technology Features of Apollo HDD Machine, Its Technical Specification with C...Technology Features of Apollo HDD Machine, Its Technical Specification with C...
Technology Features of Apollo HDD Machine, Its Technical Specification with C...
 
Présentation IIRB 2024 Marine Cordonnier.pdf
Présentation IIRB 2024 Marine Cordonnier.pdfPrésentation IIRB 2024 Marine Cordonnier.pdf
Présentation IIRB 2024 Marine Cordonnier.pdf
 
sdfsadopkjpiosufoiasdoifjasldkjfl a asldkjflaskdjflkjsdsdf
sdfsadopkjpiosufoiasdoifjasldkjfl a asldkjflaskdjflkjsdsdfsdfsadopkjpiosufoiasdoifjasldkjfl a asldkjflaskdjflkjsdsdf
sdfsadopkjpiosufoiasdoifjasldkjfl a asldkjflaskdjflkjsdsdf
 

Share your code with the Python world by
 creating pip packages

  • 1. Share your code with the Python world by
 creating pip packages Hannes Hapke
 1/28/2014 @PDXPython
  • 2. Do you have a great project and want to share it with 
 the Python world?
  • 3. Example at renooble.com >> Development of PyZillow
  • 4. Step 1: Share your code in public repo Github creates a license file automatically
  • 5. Step 2: Create helpful support files • Create your tests • Create __version__.py
 VERSION = '0.2.2'
 • Create README.txt or README.md
 ================== pyzillow 0.2.2 ================== README ------ ...
  • 6. Step 3: Create a setup.pyimport os try: from setuptools import setup except ImportError: from distutils.core import setup from __version__ import VERSION setup( name='pyzillow', version=VERSION, author='Hannes Hapke', author_email='hannes@renooble.com', url='https://github.com/hanneshapke/pyzillow', download_url='https://github.com/hanneshapke/pyzillow/archive/master.zip', description='Python interface for Zillow's API. Currently supporting GetDeepSearchResults and GetUpdatedPropertyDetails API.', long_description=open(os.path.join(os.path.dirname(__file__), 'README.txt'), 'r').read(), py_modules=['pyzillow', 'pyzillowerrors', '__version__'], provides=['pyzillow'], requires=['requests'], install_requires=['requests >= 2.2.0'], classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Financial and Insurance Industry', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'License :: OSI Approved :: MIT License', 'Topic :: Internet', 'Topic :: Internet :: WWW/HTTP', ], keywords='zillow real estate rental xml api address zipcode', license='MIT', ) https://pypi.python.org/
 pypi?:action=list_classifiers
  • 7. Step 4: Register your package with PyPI $ python setup.py register
 
 PyPI asks you to create a new account 
 or use your credentials
  • 8. Step 5: Upload your package to PyPI $ python setup.py sdist upload
 
 Voila, your package is now available to the 
 Python world! $ pip install YOUR_PACKAGE
  • 9. Use your Github README.md as README found at 
 https://coderwall.com/p/qawuyq try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): long_description = ''
  • 11. Check out Python Wheel Why? PEP 376 compliant install http://pythonwheels.com https://pypi.python.org/pypi/wheel Run 
 `python setup.py sdist bdist_wheel upload`