SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Is it a Package or
a Wrapper?
Designing, Documenting, and Distributing
a Helper Library for the Cicero API
advanced
spatial analysis
on the web
•
•
•
•
•

UI/UX Design
Web/Mobile
Data Science
HPC
R&D
https://cicero.azavea.com/v3.1/official?
last_name=Obama&valid_range=ALL&for
mat=json&token=3oh45c20f97769b9c0f30d3&user=851&pretty=
1
So that’s an API...What’s a Wrapper?
So that’s an API...What’s a Wrapper?
● Reese’s cups, like APIs, are filled with
awesome. Data! Peanut Butter!
● But the chocolate, like JSON and XML and
HTTP, will melt all over your fingers. It’s
messy.
● The wrapper keeps your hands clean so you
don’t have to deal with the messy stuff.
● You just program in Python.
Live Demo!
Documentation is Important
● If you like Sphinx or
reStructuredText,
great.
● I don’t.
○ A bit large
○ A bit complicated,
build process, etc
○ Markdown is more
intuitive, to me

● Make docs, not
arguments
Pycco - lightweight, markdown docs
Pycco - lightweight, markdown docs
$ pip install pycco
$ pycco src/my_python_file.py
pycco = mypython.py -> docs/my_python_file.html
Pycco - lightweight, markdown docs
Pycco
Packaging and Submitting to PyPi!

$ pip install whatever-python-library-you-want
“The “Python Packaging User Guide” (PUG) aims to be the authoritative
resource on how to package and install distributions in Python using current
tools...”

https://python-packaging-user-guide.readthedocs.org/en/latest/index.html
https://www.destroyallsoftware.com/talks/wat
What is a “package,” actually?
● Python Module:
○ Any single .py file.
○ Or, a multi-file module, which puts many .py files in a
directory with an __init__.py, which
■ Tells Python to treat that whole directory as one
module.
○ module
■ __init__.py
■ file1.py
■ file2.py
What is a “package,” actually?
● Python Package:
○ Often people use this word to describe a multi-file
module.
○ It's also a synonym for "distribution".
○ And it's also something in between the two.
○ And a verb.
What is a “package,” actually?
● Python Distribution:
○ "a versioned archive file that contains Python
packages, modules, and other resource files... The
distribution file is what an end-user will download
from the internet and install."

● Distributed to your users with pip and the
Python Package Index.
● But you rarely come across this word.
Why not the Python Distribution
Index?
My “Official” Packaging Docs
● Your Modules multi-file (__init__.
py) or not
My “Official” Packaging Docs
● Our “root” package
○ (Yes, a package more than a module,
not yet a distribution)

●
●
●
●
●
●
●

docs
cicero_examples.py
CHANGES.txt
LICENSE.txt
README.rst
MANIFEST.in
setup.py
My “Official” Packaging Docs
● MANIFEST.in
○ The distributionmaking utilities
include some files by
default, but not all.
■ Like our docs! We
want to distribute
those too!

● The manifest file
describes what else
to include.
My Packaging Docs - setup.py
● You will use a
utility to:
○ “Package up” your
package's files
○ Register your
project with PyPi
○ Upload an archived
distribution file for
others to download.
My Packaging Docs - setup.py
● setup.py provides
that utility the info
it needs to
“package up” the
distribution and
submit it to PyPi.
○ name, version, url,
description,
classifiers, etc
More “Wat” to setup.py...
● Too many utilities!
○ Distutils,
Setuptools,
Distribute,
Distutils2

● Different
limitations!
● No guidance!
● More “wat”!
● When in doubt,
use Setuptools.
Finally, Ready to Upload!
$ python setup.py register -r pypi
$ python setup.py sdist upload -r pypi
Come and get it
https://pypi.python.org/pypi/python-cicero/0.1.0
$ pip install python-cicero
Is it a Package or a Wrapper?

Both.
Also a distribution. :)

Contenu connexe

Similaire à Is it a Package or a Wrapper? Designing, Documenting, and Distributing a Python Helper Library for the Cicero API

Behind the Scenes at Coolblue - Feb 2017
Behind the Scenes at Coolblue - Feb 2017Behind the Scenes at Coolblue - Feb 2017
Behind the Scenes at Coolblue - Feb 2017Pat Hermens
 
An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()Blue Elephant Consulting
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtInexture Solutions
 
Python in Industry
Python in IndustryPython in Industry
Python in IndustryDharmit Shah
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-introIshaq Ali
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming BasicsDhana malar
 
Introduction to Python Programming Language For Artificial Intelligence
Introduction to Python Programming Language For Artificial IntelligenceIntroduction to Python Programming Language For Artificial Intelligence
Introduction to Python Programming Language For Artificial Intelligencesaraahmed870035
 
Python Mastery: A Comprehensive Guide to Setting Up Your Development Environment
Python Mastery: A Comprehensive Guide to Setting Up Your Development EnvironmentPython Mastery: A Comprehensive Guide to Setting Up Your Development Environment
Python Mastery: A Comprehensive Guide to Setting Up Your Development EnvironmentPython Devloper
 
Python A Comprehensive Guide for Beginners.pdf
Python A Comprehensive Guide for Beginners.pdfPython A Comprehensive Guide for Beginners.pdf
Python A Comprehensive Guide for Beginners.pdfKajal Digital
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxAditya Patel
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixC4Media
 
Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.pptRehnawilson1
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonMohammed Rafi
 
Docker for business: How I stopped worrying about antipatterns
Docker for business: How I stopped worrying about antipatternsDocker for business: How I stopped worrying about antipatterns
Docker for business: How I stopped worrying about antipatternsLenses.io
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 

Similaire à Is it a Package or a Wrapper? Designing, Documenting, and Distributing a Python Helper Library for the Cicero API (20)

Behind the Scenes at Coolblue - Feb 2017
Behind the Scenes at Coolblue - Feb 2017Behind the Scenes at Coolblue - Feb 2017
Behind the Scenes at Coolblue - Feb 2017
 
An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()
 
Toolboxes for data scientists
Toolboxes for data scientistsToolboxes for data scientists
Toolboxes for data scientists
 
What is python
What is pythonWhat is python
What is python
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txt
 
Python in Industry
Python in IndustryPython in Industry
Python in Industry
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-intro
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming Basics
 
Introduction to Python Programming Language For Artificial Intelligence
Introduction to Python Programming Language For Artificial IntelligenceIntroduction to Python Programming Language For Artificial Intelligence
Introduction to Python Programming Language For Artificial Intelligence
 
Python Mastery: A Comprehensive Guide to Setting Up Your Development Environment
Python Mastery: A Comprehensive Guide to Setting Up Your Development EnvironmentPython Mastery: A Comprehensive Guide to Setting Up Your Development Environment
Python Mastery: A Comprehensive Guide to Setting Up Your Development Environment
 
Python A Comprehensive Guide for Beginners.pdf
Python A Comprehensive Guide for Beginners.pdfPython A Comprehensive Guide for Beginners.pdf
Python A Comprehensive Guide for Beginners.pdf
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptx
 
Python with dataScience
Python with dataSciencePython with dataScience
Python with dataScience
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFix
 
Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.ppt
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Docker for business: How I stopped worrying about antipatterns
Docker for business: How I stopped worrying about antipatternsDocker for business: How I stopped worrying about antipatterns
Docker for business: How I stopped worrying about antipatterns
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Python
PythonPython
Python
 

Plus de Azavea

Using New Tools to Analyze and Plan Your Urban Forest
Using New Tools to Analyze and Plan Your Urban Forest Using New Tools to Analyze and Plan Your Urban Forest
Using New Tools to Analyze and Plan Your Urban Forest Azavea
 
7 misconceptions about predictive policing webinar
7 misconceptions about predictive policing webinar7 misconceptions about predictive policing webinar
7 misconceptions about predictive policing webinarAzavea
 
Tracking Your Green Infrastructure
Tracking Your Green InfrastructureTracking Your Green Infrastructure
Tracking Your Green InfrastructureAzavea
 
Growing Your Urban Forest: Using the OpenTreeMap Bulk Uploader
Growing Your Urban Forest: Using the OpenTreeMap Bulk UploaderGrowing Your Urban Forest: Using the OpenTreeMap Bulk Uploader
Growing Your Urban Forest: Using the OpenTreeMap Bulk UploaderAzavea
 
Forecasting Space-Time Events - Strata + Hadoop World 2015 San Jose
Forecasting Space-Time Events - Strata + Hadoop World 2015 San JoseForecasting Space-Time Events - Strata + Hadoop World 2015 San Jose
Forecasting Space-Time Events - Strata + Hadoop World 2015 San JoseAzavea
 
November 12, 2014 Webinar: Hackers, Beer Geeks, and Arborly Love - Reaching o...
November 12, 2014 Webinar: Hackers, Beer Geeks, and Arborly Love - Reaching o...November 12, 2014 Webinar: Hackers, Beer Geeks, and Arborly Love - Reaching o...
November 12, 2014 Webinar: Hackers, Beer Geeks, and Arborly Love - Reaching o...Azavea
 
Mobile Citizen Science
Mobile Citizen Science Mobile Citizen Science
Mobile Citizen Science Azavea
 
Getting Started with OpenTreeMap Cloud
Getting Started with OpenTreeMap CloudGetting Started with OpenTreeMap Cloud
Getting Started with OpenTreeMap CloudAzavea
 
HunchLab 2.0 Getting Started
HunchLab 2.0 Getting StartedHunchLab 2.0 Getting Started
HunchLab 2.0 Getting StartedAzavea
 
Your New Partners: Understanding Civic Hackathons, Why You Should be Involved...
Your New Partners: Understanding Civic Hackathons, Why You Should be Involved...Your New Partners: Understanding Civic Hackathons, Why You Should be Involved...
Your New Partners: Understanding Civic Hackathons, Why You Should be Involved...Azavea
 
HunchLab 2.0 Predictive Missions: Under the Hood
HunchLab 2.0 Predictive Missions: Under the HoodHunchLab 2.0 Predictive Missions: Under the Hood
HunchLab 2.0 Predictive Missions: Under the HoodAzavea
 
Using Open Data and Citizen Science to Promote Citizen Engagement with Green ...
Using Open Data and Citizen Science to Promote Citizen Engagement with Green ...Using Open Data and Citizen Science to Promote Citizen Engagement with Green ...
Using Open Data and Citizen Science to Promote Citizen Engagement with Green ...Azavea
 
HunchLab 2.0 Preview Webinar - Place
HunchLab 2.0 Preview Webinar - PlaceHunchLab 2.0 Preview Webinar - Place
HunchLab 2.0 Preview Webinar - PlaceAzavea
 
Five Technology Trends Every Nonprofit Needs to Know
Five Technology Trends Every Nonprofit Needs to KnowFive Technology Trends Every Nonprofit Needs to Know
Five Technology Trends Every Nonprofit Needs to KnowAzavea
 
PhillyHistory.org - Tracking Metrics for a Digital Project
PhillyHistory.org - Tracking Metrics for a Digital ProjectPhillyHistory.org - Tracking Metrics for a Digital Project
PhillyHistory.org - Tracking Metrics for a Digital ProjectAzavea
 
Data Philly Meetup - Big (Geo) Data
Data Philly Meetup - Big (Geo) DataData Philly Meetup - Big (Geo) Data
Data Philly Meetup - Big (Geo) DataAzavea
 
Fed Geo Day - Applying GeoTrellis at the US Army Corps
Fed Geo Day - Applying GeoTrellis at the US Army CorpsFed Geo Day - Applying GeoTrellis at the US Army Corps
Fed Geo Day - Applying GeoTrellis at the US Army CorpsAzavea
 
Fed Geo Day - GeoTrellis Intro
Fed Geo Day - GeoTrellis IntroFed Geo Day - GeoTrellis Intro
Fed Geo Day - GeoTrellis IntroAzavea
 
Fed Geo Day 2013 - Azavea Intro
Fed Geo Day 2013 - Azavea Intro Fed Geo Day 2013 - Azavea Intro
Fed Geo Day 2013 - Azavea Intro Azavea
 
Modeling Count-based Raster Data with ArcGIS and R
Modeling Count-based Raster Data with ArcGIS and RModeling Count-based Raster Data with ArcGIS and R
Modeling Count-based Raster Data with ArcGIS and RAzavea
 

Plus de Azavea (20)

Using New Tools to Analyze and Plan Your Urban Forest
Using New Tools to Analyze and Plan Your Urban Forest Using New Tools to Analyze and Plan Your Urban Forest
Using New Tools to Analyze and Plan Your Urban Forest
 
7 misconceptions about predictive policing webinar
7 misconceptions about predictive policing webinar7 misconceptions about predictive policing webinar
7 misconceptions about predictive policing webinar
 
Tracking Your Green Infrastructure
Tracking Your Green InfrastructureTracking Your Green Infrastructure
Tracking Your Green Infrastructure
 
Growing Your Urban Forest: Using the OpenTreeMap Bulk Uploader
Growing Your Urban Forest: Using the OpenTreeMap Bulk UploaderGrowing Your Urban Forest: Using the OpenTreeMap Bulk Uploader
Growing Your Urban Forest: Using the OpenTreeMap Bulk Uploader
 
Forecasting Space-Time Events - Strata + Hadoop World 2015 San Jose
Forecasting Space-Time Events - Strata + Hadoop World 2015 San JoseForecasting Space-Time Events - Strata + Hadoop World 2015 San Jose
Forecasting Space-Time Events - Strata + Hadoop World 2015 San Jose
 
November 12, 2014 Webinar: Hackers, Beer Geeks, and Arborly Love - Reaching o...
November 12, 2014 Webinar: Hackers, Beer Geeks, and Arborly Love - Reaching o...November 12, 2014 Webinar: Hackers, Beer Geeks, and Arborly Love - Reaching o...
November 12, 2014 Webinar: Hackers, Beer Geeks, and Arborly Love - Reaching o...
 
Mobile Citizen Science
Mobile Citizen Science Mobile Citizen Science
Mobile Citizen Science
 
Getting Started with OpenTreeMap Cloud
Getting Started with OpenTreeMap CloudGetting Started with OpenTreeMap Cloud
Getting Started with OpenTreeMap Cloud
 
HunchLab 2.0 Getting Started
HunchLab 2.0 Getting StartedHunchLab 2.0 Getting Started
HunchLab 2.0 Getting Started
 
Your New Partners: Understanding Civic Hackathons, Why You Should be Involved...
Your New Partners: Understanding Civic Hackathons, Why You Should be Involved...Your New Partners: Understanding Civic Hackathons, Why You Should be Involved...
Your New Partners: Understanding Civic Hackathons, Why You Should be Involved...
 
HunchLab 2.0 Predictive Missions: Under the Hood
HunchLab 2.0 Predictive Missions: Under the HoodHunchLab 2.0 Predictive Missions: Under the Hood
HunchLab 2.0 Predictive Missions: Under the Hood
 
Using Open Data and Citizen Science to Promote Citizen Engagement with Green ...
Using Open Data and Citizen Science to Promote Citizen Engagement with Green ...Using Open Data and Citizen Science to Promote Citizen Engagement with Green ...
Using Open Data and Citizen Science to Promote Citizen Engagement with Green ...
 
HunchLab 2.0 Preview Webinar - Place
HunchLab 2.0 Preview Webinar - PlaceHunchLab 2.0 Preview Webinar - Place
HunchLab 2.0 Preview Webinar - Place
 
Five Technology Trends Every Nonprofit Needs to Know
Five Technology Trends Every Nonprofit Needs to KnowFive Technology Trends Every Nonprofit Needs to Know
Five Technology Trends Every Nonprofit Needs to Know
 
PhillyHistory.org - Tracking Metrics for a Digital Project
PhillyHistory.org - Tracking Metrics for a Digital ProjectPhillyHistory.org - Tracking Metrics for a Digital Project
PhillyHistory.org - Tracking Metrics for a Digital Project
 
Data Philly Meetup - Big (Geo) Data
Data Philly Meetup - Big (Geo) DataData Philly Meetup - Big (Geo) Data
Data Philly Meetup - Big (Geo) Data
 
Fed Geo Day - Applying GeoTrellis at the US Army Corps
Fed Geo Day - Applying GeoTrellis at the US Army CorpsFed Geo Day - Applying GeoTrellis at the US Army Corps
Fed Geo Day - Applying GeoTrellis at the US Army Corps
 
Fed Geo Day - GeoTrellis Intro
Fed Geo Day - GeoTrellis IntroFed Geo Day - GeoTrellis Intro
Fed Geo Day - GeoTrellis Intro
 
Fed Geo Day 2013 - Azavea Intro
Fed Geo Day 2013 - Azavea Intro Fed Geo Day 2013 - Azavea Intro
Fed Geo Day 2013 - Azavea Intro
 
Modeling Count-based Raster Data with ArcGIS and R
Modeling Count-based Raster Data with ArcGIS and RModeling Count-based Raster Data with ArcGIS and R
Modeling Count-based Raster Data with ArcGIS and R
 

Dernier

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Dernier (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Is it a Package or a Wrapper? Designing, Documenting, and Distributing a Python Helper Library for the Cicero API

  • 1. Is it a Package or a Wrapper? Designing, Documenting, and Distributing a Helper Library for the Cicero API
  • 2. advanced spatial analysis on the web • • • • • UI/UX Design Web/Mobile Data Science HPC R&D
  • 3.
  • 4.
  • 6. So that’s an API...What’s a Wrapper?
  • 7. So that’s an API...What’s a Wrapper? ● Reese’s cups, like APIs, are filled with awesome. Data! Peanut Butter! ● But the chocolate, like JSON and XML and HTTP, will melt all over your fingers. It’s messy. ● The wrapper keeps your hands clean so you don’t have to deal with the messy stuff. ● You just program in Python.
  • 9. Documentation is Important ● If you like Sphinx or reStructuredText, great. ● I don’t. ○ A bit large ○ A bit complicated, build process, etc ○ Markdown is more intuitive, to me ● Make docs, not arguments
  • 10. Pycco - lightweight, markdown docs
  • 11. Pycco - lightweight, markdown docs $ pip install pycco $ pycco src/my_python_file.py pycco = mypython.py -> docs/my_python_file.html
  • 12. Pycco - lightweight, markdown docs
  • 13. Pycco
  • 14. Packaging and Submitting to PyPi! $ pip install whatever-python-library-you-want
  • 15. “The “Python Packaging User Guide” (PUG) aims to be the authoritative resource on how to package and install distributions in Python using current tools...” https://python-packaging-user-guide.readthedocs.org/en/latest/index.html
  • 17. What is a “package,” actually? ● Python Module: ○ Any single .py file. ○ Or, a multi-file module, which puts many .py files in a directory with an __init__.py, which ■ Tells Python to treat that whole directory as one module. ○ module ■ __init__.py ■ file1.py ■ file2.py
  • 18. What is a “package,” actually? ● Python Package: ○ Often people use this word to describe a multi-file module. ○ It's also a synonym for "distribution". ○ And it's also something in between the two. ○ And a verb.
  • 19. What is a “package,” actually? ● Python Distribution: ○ "a versioned archive file that contains Python packages, modules, and other resource files... The distribution file is what an end-user will download from the internet and install." ● Distributed to your users with pip and the Python Package Index. ● But you rarely come across this word.
  • 20. Why not the Python Distribution Index?
  • 21. My “Official” Packaging Docs ● Your Modules multi-file (__init__. py) or not
  • 22. My “Official” Packaging Docs ● Our “root” package ○ (Yes, a package more than a module, not yet a distribution) ● ● ● ● ● ● ● docs cicero_examples.py CHANGES.txt LICENSE.txt README.rst MANIFEST.in setup.py
  • 23. My “Official” Packaging Docs ● MANIFEST.in ○ The distributionmaking utilities include some files by default, but not all. ■ Like our docs! We want to distribute those too! ● The manifest file describes what else to include.
  • 24. My Packaging Docs - setup.py ● You will use a utility to: ○ “Package up” your package's files ○ Register your project with PyPi ○ Upload an archived distribution file for others to download.
  • 25. My Packaging Docs - setup.py ● setup.py provides that utility the info it needs to “package up” the distribution and submit it to PyPi. ○ name, version, url, description, classifiers, etc
  • 26. More “Wat” to setup.py... ● Too many utilities! ○ Distutils, Setuptools, Distribute, Distutils2 ● Different limitations! ● No guidance! ● More “wat”! ● When in doubt, use Setuptools.
  • 27. Finally, Ready to Upload! $ python setup.py register -r pypi $ python setup.py sdist upload -r pypi
  • 28. Come and get it https://pypi.python.org/pypi/python-cicero/0.1.0 $ pip install python-cicero
  • 29. Is it a Package or a Wrapper? Both. Also a distribution. :)