how we use python at bitbucket
TRANSCRIPT
![Page 1: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/1.jpg)
MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS
How we use Python at Bitbucket(tldr; We use it for everything)
![Page 2: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/2.jpg)
W H AT I S B I T B U C K E T
What is Bitbucket?
•Distributed code hosting•Perfect for individuals or teams• Git or Mercurial• Free for 5 users +Unlimited private repositories
Try it out! - http://bitbucket.org
![Page 3: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/3.jpg)
• Main web application https://bitbucket.org
• REST APIhttps://api.bitbucket.org
Web Tier
![Page 4: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/4.jpg)
• HA Proxy TCP load balancing
• Nginx SSL Termination
• PostgreSQLRelational database
• RedisCaching
Web Tier
![Page 5: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/5.jpg)
C E L E RY
Distributed Tasks• Celery• Used for asynchronous event processing
• Sending notifications• Updating pull requests• Updating activity feed
• RabbitMQ used as the message broker
![Page 6: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/6.jpg)
O R O C H I
Orochi• Translated “8-branched giant snake"• Abstraction library for Git and Mercurial• Written entirely in Python• Simplifies the interaction with repositories
Git & Hg have similarities:• Both store your code• Both have commits• Both have branches
Django Celery
Orochi
Storage Layer
![Page 7: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/7.jpg)
G I T + H G O P E R AT I O N S
Git & Hg Operations
• HTTP• WSGI apps - One for Git, One for Hg
• SSH• OpenSSH - Customized!• Launches another process (conq) to
perform authentication and execute DVCS operations
![Page 8: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/8.jpg)
Can you guess what language?
![Page 9: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/9.jpg)
Nope, Go
![Page 10: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/10.jpg)
But really Python
![Page 11: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/11.jpg)
We dogfood our stuff!
![Page 12: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/12.jpg)
![Page 13: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/13.jpg)
Feedback?
MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS
![Page 14: How we use Python at Bitbucket](https://reader033.vdocuments.mx/reader033/viewer/2022051300/58a87f901a28abb47a8b51c9/html5/thumbnails/14.jpg)
We’re hiring!
MARK ADAMS • SOFTWARE DEVELOPER • BITBUCKET • @MARKADAMS