SlideShare a Scribd company logo
Episode #2.0.1 (2016-10-24) Level: Beginner
OctoLab Cookbook
How to use composer.yml
and stop creating issues about
The context
OctoLab Cookbook: how to use composer.yml and stop creating issues about
The problem
• composer/composer#159
• composer/composer#440
• composer/composer#1778
• composer/composer#1988
• composer/composer#5364
is:issue is:closed yaml
The solution
Installation
• https://www.python.org/downloads/ (but most cases it
is already exists)
• pip install pyyaml
• or apt-get install python-yaml
• or yum install python-yaml
• etc.
Requirements
• Python
• PyYAML
- first: imports
import sys, yaml, json;
- second: suppress traceback
sys.tracebacklimit = 0;
- third: print it
print(json.dumps(yaml.load(open(sys.argv[1]).read())))
- fourth: integrate all together
<command> = python -c 
"import sys, yaml, json; 
sys.tracebacklimit = 0; 
print(json.dumps(yaml.load(open(sys.argv[1]).read()), indent=2))"
# ~/.bash_profile
alias yaml2json = <command>
# use it
yaml2json composer.yml > composer.json
The benefits
OctoLab Cookbook: how to use composer.yml and stop creating issues about
OctoLab Cookbook: how to use composer.yml and stop creating issues about
OctoLab Cookbook: how to use composer.yml and stop creating issues about
COMMENTS!!!
OctoLab Cookbook: how to use composer.yml and stop creating issues about
OctoLab Cookbook: how to use composer.yml and stop creating issues about
OctoLab Cookbook: how to use composer.yml and stop creating issues about
Bonus: PhpStorm integration
OctoLab Cookbook: how to use composer.yml and stop creating issues about
• Convert YAML to JSON Online with related
tools on different languages for console
• composer-yaml
• Example of usage
• package.meta initiative
Useful links
Thank you for your attention!
Have questions?
Kamil Samigullin
a some developer
kamil@samigullin.info
@ikamilsk
github.com/kamilsk
linkedin.com/in/kamilsk

More Related Content

PDF
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
PPT
Apache Storm by Skidmarkii
PDF
Reactive Extensions
PDF
Asynchronous Python at Kumparan
PDF
Introduction to RevKit
PDF
tokyotalk
PDF
pdb like a pro
PPT
Repl internals
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
Apache Storm by Skidmarkii
Reactive Extensions
Asynchronous Python at Kumparan
Introduction to RevKit
tokyotalk
pdb like a pro
Repl internals

What's hot (12)

PPTX
Sync with async
PPTX
Getting started with rabbitmq
PDF
XebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez Xebia
ODP
Managing the logs of your (Rails) applications - RailsWayCon 2011
PPTX
Go Concurrency Patterns
PDF
libuv, NodeJS and everything in between
PPT
Stack linked list
ODP
Rails exception tracking with Graylog2 - RubyAndRails 2010 EU
PDF
RedisDay London 2018 - What happens when Redis runs out of memory
PDF
Introducing the openCypher Implementers Group
PDF
Using zone.js
PDF
Logging in JavaScript - Part-4
Sync with async
Getting started with rabbitmq
XebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez Xebia
Managing the logs of your (Rails) applications - RailsWayCon 2011
Go Concurrency Patterns
libuv, NodeJS and everything in between
Stack linked list
Rails exception tracking with Graylog2 - RubyAndRails 2010 EU
RedisDay London 2018 - What happens when Redis runs out of memory
Introducing the openCypher Implementers Group
Using zone.js
Logging in JavaScript - Part-4
Ad

Similar to OctoLab Cookbook: how to use composer.yml and stop creating issues about (20)

PDF
2018 - CertiFUNcation - Helmut Hummel: Hardening TYPO3
ODP
Pythonpresent
PDF
GoLang & GoatCore
PDF
Princeton Wintersession: Software Quality Assurance Tooling
PDF
perlcc made easy or, how to make a CGI Moose app
PDF
Software Quality Assurance Tooling 2023
PPT
OpenStack How To - PyLadies ATX
PDF
Proposalforootconf
PDF
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Mac
PDF
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Windows
PDF
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Linux
PDF
Helpful pre commit hooks for Python and Django
DOCX
Adding System Call to Kernel
PDF
What Have Syscalls Done for you Lately?
PDF
PyCon 2013 : Scripting to PyPi to GitHub and More
PDF
Elasticwulf Pycon Talk
DOCX
matmultHomework3.pdfNames of Files to Submit matmult..docx
PDF
The origin: Init (compact version)
PDF
Tales from the dark side: developing SDKs at scale
PPTX
Linux kernel debugging
2018 - CertiFUNcation - Helmut Hummel: Hardening TYPO3
Pythonpresent
GoLang & GoatCore
Princeton Wintersession: Software Quality Assurance Tooling
perlcc made easy or, how to make a CGI Moose app
Software Quality Assurance Tooling 2023
OpenStack How To - PyLadies ATX
Proposalforootconf
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Mac
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Windows
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Linux
Helpful pre commit hooks for Python and Django
Adding System Call to Kernel
What Have Syscalls Done for you Lately?
PyCon 2013 : Scripting to PyPi to GitHub and More
Elasticwulf Pycon Talk
matmultHomework3.pdfNames of Files to Submit matmult..docx
The origin: Init (compact version)
Tales from the dark side: developing SDKs at scale
Linux kernel debugging
Ad

More from Kamil Samigullin (7)

PDF
OctoLab Cookbook: Go lang tips and tricks - protection of sensitive config data
PDF
OctoLab Cookbook: how to generate a unique key for a sequence
PDF
Enter Cookbook: refactoring under a microscope
PDF
Enter: testing
PDF
Enter: legacy code
PDF
Enter: code style
PDF
Enter: git workflow
OctoLab Cookbook: Go lang tips and tricks - protection of sensitive config data
OctoLab Cookbook: how to generate a unique key for a sequence
Enter Cookbook: refactoring under a microscope
Enter: testing
Enter: legacy code
Enter: code style
Enter: git workflow

Recently uploaded (20)

PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Pharma ospi slides which help in ospi learning
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Complications of Minimal Access Surgery at WLH
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Lesson notes of climatology university.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
GDM (1) (1).pptx small presentation for students
Pharma ospi slides which help in ospi learning
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Cell Types and Its function , kingdom of life
Complications of Minimal Access Surgery at WLH
2.FourierTransform-ShortQuestionswithAnswers.pdf
VCE English Exam - Section C Student Revision Booklet
FourierSeries-QuestionsWithAnswers(Part-A).pdf
01-Introduction-to-Information-Management.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O7-L3 Supply Chain Operations - ICLT Program
RMMM.pdf make it easy to upload and study
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Module 4: Burden of Disease Tutorial Slides S2 2025
Lesson notes of climatology university.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
human mycosis Human fungal infections are called human mycosis..pptx
202450812 BayCHI UCSC-SV 20250812 v17.pptx

OctoLab Cookbook: how to use composer.yml and stop creating issues about