SlideShare a Scribd company logo
1 of 29
Download to read offline
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. :)

More Related Content

Similar to 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
 

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

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. :)