Kivy: Interactive Applications in Python
eBook - ePub

Kivy: Interactive Applications in Python

Roberto Ulloa Rodriguez

Share book
  1. 138 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Kivy: Interactive Applications in Python

Roberto Ulloa Rodriguez

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

Mobiles and tablets have brought with them a dramatic change in the utility of applications. Compatibility has become essential, and this has increased the kind of interaction that users expect: gestures, multi-touches, animations, and magic pens. Kivy is an open source Python solution that covers these market needs with an easy-to-learn and rapid development approach. Kivy is growing fast and gaining attention as an alternative to the established developing platforms.

Kivy: Interactive Applications in Python quickly introduces you to the Kivy development methodology. You will learn some examples of how to use many of the Kivy components, as well as understand how to integrate and combine them into big projects. This book serves as a reference guide and is organized in such a way that once finished, you will have already completed your first project.

You will start by learning the Kivy Language for building User Interfaces (UI) and vector figures. We then proceed to the uses of Kivy events and properties to glue the UI with the application logic.

You then go on to build an entire User Interface (UI) starting from a hand-made sketch. Furthermore, you will go on to understand how to use the canvas and drawing instructions to create different types of geometrical figures. Finally, you will be introduced to a big set of interactive and smooth features: transformations (scale, rotate, and translate), gestures, animations, scheduling tasks, and multi-touch elements.

Kivy: Interactive Applications in Python expands your knowledge by introducing various components that improve the User Experience (UX). Towards the end of the book, you will be confident to utilize Kivy components and strategies to start any application or game you have in mind.

Approach

Kivy: Interactive Applications in Python is an easy-to-follow book that will guide you into the world of Kivy.

Who this book is for

This book is aimed at Python developers who are familiar with Python and have a good understanding of concepts like inheritance, classes, and instances. No previous experience of Kivy is required, though some knowledge of event handling, scheduling, and user interfaces, in general, would boost your learning.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Kivy: Interactive Applications in Python an online PDF/ePUB?
Yes, you can access Kivy: Interactive Applications in Python by Roberto Ulloa Rodriguez in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2013
ISBN
9781783281596
Edition
1

Kivy: Interactive Applications in Python


Table of Contents

Kivy: Interactive Applications in Python
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. GUI Basics – Building an Interface
Hello World!
Basic widgets – labels and buttons
Layouts
Embedding layouts
Our Project – comic creator
Summary
2. Graphics – The Canvas
Basic shapes
Images, colors, and backgrounds
Rotating, translating, and scaling
Comic creator – PushMatrix and PopMatrix
Summary
3. Widget Events – Binding Actions
Attributes, id and root
Basic widget events – dragging the stickman
Localizing coordinates – adding stickmen
Binding and unbinding events – sizing limbs and heads
Binding events in the Kivy language
Creating your own events – the magical properties
Kivy and properties
Summary
4. Improving the User Experience
Screen manager – selecting colors for the figures
Color Control on the canvas – coloring figures
StencilView – limiting the drawing space
Scatter – multitouching to drag, rotate, and scale
Recording gestures – line, circles, and cross
Simple gestures – drawing with the finger
Summary
5. Invaders Revenge – An Interactive Multitouch Game
Invaders Revenge – an animated multitouch game
Atlas – efficient management of images
Boom – simple sound effects
Ammo – simple animation
Invader – transitions for animations
Dock – automatic binding in the Kivy language
Fleet – infinite concatenation of animations
Scheduling events with the Clock
Shooter – multitouch control
Invasion – moving the shooter with the keyboard
Combining animations with '+' and '&'
Summary
Index

Kivy: Interactive Applications in Python

Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2013
Production Reference: 1190913
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-159-6
www.packtpub.com
Cover Image by Aniket Sawant ()

Credits

Author
Roberto Ulloa
Reviewers
Anai Arroyo B.
Andrés Vargas González
Javier de la Rosa
Hugo Solis
Acquisition Editor
James Jones
Commissioning Editor
Sruthi Kutty
Technical Editors
Ruchita Bhansali
Gauri Dasgupta
Monica John
Project Coordinator
Michelle Quadros
Proofreader
Amy Johnson
Indexer
Monica Ajmera Mehta
Graphics
Ronak Dhruv
Production Coordinator
Nilesh R. Mohite
Cover Work
Nilesh R. Mohite

About the Author

Roberto Ulloa has a diverse academic record in multiple disciplines within the field of Computer Science. He obtained an MSc from the University of Costa Rica and also taught programming and computer networking there. He then spent two years researching about cultural complexity at PhD level at the CulturePlex Lab of the University of Western Ontario.
He loves travelling and enjoys an itinerant life, living among different cultures and environments. He loves nature and has spent many months volunteering in Central and South America.
He currently lives in Kuala Lumpur, earning a living as a web developer in Python/Django and PHP/Wordpress. He constantly worries that the Internet has already become aware of itself and we are not able to communicate with it because of the improbability of it being able to speak Spanish or any of the 6,000 odd human languages that exist in this world.

Acknowledgments

I would like to thank Su, for not hesitating one second in encouraging and trusting my ability to write this book; for believing in me and motivating me with endless cups of coffee.
Javier de la Rosa, with whom I worked on my first Kivy project—the one that gave birth to the blog post that caught the attention of my publishers.
My technical reviewers, Anaí Arroyo, Javier de la Rosa, Hugo Solís and Andrés Vargas for their time and corrections.
My supervisor, Gabriela Barrantes, who has been a constant source of support and inspiration throughout my academic life.
My family and friends, for whom this book will be a surprise, and who've paid with the time that I didn't have to share with them.
The editorial personnel, for their patience in answering my questions.
Celina, for risking her Android to test my codes for the first time; for her constant motivation, support, and criticism even though I disagree that my Space Invaders look like bunnies and, if so, I still think they are terrifying space bunnies.

About the Reviewers

Anaí Arroyo is a PMI certified Project Manager who loves software development and is passionate about how technology can be used to improve the quality of people's life and volunteering as a way to contribute to make a positive difference.
Over the last years, she has worked in the Education field, collaborating in the design and development of Learning Management and Student Information Management systems.
Andrés Vargas González is currently pursuing a Master of Science in Computer Science through a Fulbright Fellowship at University of Central Florida (UCF). He received a Bachelor's degree in the same f...

Table of contents