Ready to try one story. Here is how to get started!
Head to the Python website and download Python 3 for your operating system
Go to terminal and install the pip package corresponding to the workshop you want to try.
pip install py101
Run the following command and follow the instructions.
Choose a story:
Sample story (fork or copy to create your own story).
# Install the workshop pip install hipyschool # Run the workshop hipyschool
A Pyschool story for learning python essentials.
pip install py101 && py101
Workshop for learning regular expressions using the commandline.
pip install learnregex && learnregex
“Education is for improving the lives of others and for leaving your community and world better than you found it” Marian Wright Edelman
PySchool is a fully community driven effort and is 100% open source. This means that anyone can use the PySchool materials and/or host an event. There's a lot of flexibility in the specifics of running a PySchool event. The only expectations for event hosts is that events be not-for-profit (free or low cost) and that governance of events should have an open membership model.
- Make the event beginner friendly, if possible. Accessible even to those with no previous programming experience. Don't focus on the technicalities, try to show the fun and practical aspect of whatever technology is being used.
- You can use whatever tools and technologies you're most familiar with, although we do favor freely available open source tools and frameworks.
- Learning something completely new can be intimidating. A smile and a friendly atmosphere can help break the ice and make those, who don't consider themselves "technical", more at ease.
- It's also a good idea to plan a follow up. How can your participants keep learning? Who can they turn to if they have more questions?
- A group of people willing to learn. For example, your students, coworkers, friends, or a specific group you want to help. Remember, two is a group already!
- One or more teachers or facilitators. The number depends on the type and size of the event. For hands-on workshops, it can be a good idea to form smaller groups that can work with their own facilitators. Code Week events are usually targeted at beginners, so teachers/facilitators don't have to be professional programmers. It's more important to have a passion for sharing knowledge, the patience to answer questions and the empathy to understand a beginner's perspective. For larger events, it might also be a good idea to have a host that makes sure everyone has what they need and keep things running smoothly.
- A place to be at. Classrooms, conference rooms and various public spaces can all make a great event venue with some preparation. When determining the amount of people a venue will accommodate, keep in mind that the room will get noisy and the air bad with during a hands on workshop, so don't try to stuff too many people in a windowless room because nobody enjoys coding with a headache.
- Computers with broadband internet connection. Depending on your target group, you might ask participants to bring their own laptops, in which case don't forget to provide enough power outlets. If you have existing computer equipment at the venue, make sure they already have the necessary software installed and provide participants with instructions on how the installation can be done on their own devices. When planning internet access, keep in mind that participants will probably also want to Google or StackOverflow things and share the event through social media on mobile devices, so make sure your WiFi can accommodate those extra devices.
- And finally, something to work with/learn. Depending on your focus group, try to find topics that are age appropriate and present them in a way that's relevant to your participant's interests. Kids might enjoy making games with Scratch, teenagers making a dating app with Rails, college students using Python for data collection/analysis, adults learning the basics of HTML/CSS for a online CV or setting up their blog. You can't create programmers in a day or week, but you can show your participants how fun it can be to create something on your own. When choosing a topic, don't start with the tools you want to use, but rather focus on the outcomes you wish to achieve. Search the web for existing lesson plans, workshop programs and adjust them to your group's needs.
“The only way to learn a new programming language is by writing programs in it.” Dennis Ritchie
Pyschool could always use more stories, whether as specific python features, existing libraries, programming concepts, or even programming concepts not specific to Python itself like event handling, threading and such. New stories are always welcome :)
Ready to write your story? Here's how to set up a story for local development. All stories derive from the base Story library.
- Fork/clone/copy the hipyschool or the py101 repo on Github. Those a good examples of simple stories to begin with.
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you could set up your copy for local development:
mkvirtualenv my_python_story cd my_python_story/ python setup.py develop
- Create a module for your Story. For example
mystory/__init__.py. Define the
adventuresvariables. You will have to use the
story.translationto receive translations. More on that below.
Create one or more Adventures. A story is a collection of one or more adventures
- Create a module for your adventure for example
- Create the
README.rstfile describing your adventure in the previous folder
- (Optional) Make an Spanish translation. You must name it
- In the
__init__.pyfile define a class called
Adventure, that derives from BaseAdventure.
- Create a module for your adventure for example
gettext()function relies on PyBabel, so you will have to initialize the translation by running:
make msg-init make msg-extract
You should see several files for each language in
mystory/locale/corresponding for the usages of the
gettext()function. If the command fail, try again.
(Optional) Modify and add translations in the locale files and then run:
It is recommended to create some unit tests for checking your solutions, check that your changes pass flake8, tox, and the unit tests:
flake8 my_python_story tests python setup.py test or py.test tox
To get flake8 and tox, just pip install them into your virtualenv.
Commit your changes and push your branch to GitHub:
git add . git commit -m "Your detailed description of your changes." git push origin
Publish your package in pip, so it is available publicly
- Let us know or submit a pull request to the Pyschool GitHub website to update our website to include your story.
Attribution and License
Inspired by NodeSchool.MIT License.