Skip to content
/ pasture Public

share a python env amongst students. graze together to grow together™

License

Notifications You must be signed in to change notification settings

frnsys/pasture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pasture

Pasture

(Image source, modified and licensed under CC BY-SA 3.0.)

When teaching Python to students, I've found the hardest part is all the setup involved. Some students have different computers, depending on the class, many might have never programmed before and don't have any dev environment at all. Walking everyone through preparing their systems takes forever. This is often even the case with experienced devs!

This project has mostly been superseded by newer versions of jupyterhub. Now it just manages system users for use with jupyterhub.

A jupyterhub config (jupyterhub_config.py) that's compatible with Pasture is included (though you need to update some of its values for your own server). It should go in /etc/jupyterhub_config.py, and then jupyterhub can be run with:

jupyterhub -f /etc/jupyterhub_config.py

Usage

Clone this repo to your host machine.

Then you can run the pasture script from within the repo.

./pasture <command>

Available commands:
- mkusers #  - create # users (usernames are randomly-generated;
               password is the username, used as logins for jupyterhub)
- rmusers    - remove users created by pasture
- lsusers    - list all users. also accepts additional flags:
    - -s     - list users with active jupyter servers
    - -u     - list unclalimed users (users not running jupyter servers)
    - -m     - realtime list of unclaimed users

Example usage

# make users for folks to login as
./pasture mkusers 10

# display a realtime list of unclaimed users
# make it big, throw up on a projector for others to see
./pasture lsusers -m

# have people go to some.site.com and login as one of the users

# clean up created users
./pasture rmusers

About

share a python env amongst students. graze together to grow together™

Resources

License

Stars

Watchers

Forks

Packages

No packages published