Skip to content

phette23/c4l24-python4lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python{4}Lib (Code4Lib 2024 Workshop)

phette.net/py (redirects here)

Post-conference workshop for Code4Lib 2024. 9:00am - 12:00pm on Thursday, May 16th. We will be in Room 2185 of the North Quadrangle building. From the conference website:

North Quad is about 2-blocks from the League at 105 S. State St and has two, physically separated towers (one with academic offices, the other with a residence hall and classrooms). Use the main entrance to the tallest tower, which is around the corner from the street address in the southeast part of the building near Thayer and E. Washington St. The entrance is on a plaza and there is a ramp up to handicap accessible doors.

Workshops will be held in instructional spaces on the ground floor (floor 2) and lower level (floor 1) in rooms: 1265, 1255, 2255, 2245, 2185. Please consult the detailed workshop schedule to identify your room. We’ll have signage at the main entrance to help guide you and there is an elevator on the left after you enter the building.

Session Description

Python{4}Lib is an informal discussion group which meets biweekly over Zoom. The first hour of this workshop will be one of these informal discussions; a lightly guided chat about all things python in GLAM. For the rest of the session, we will focus on a variety of topics related to the python language with an eye towards improving our understanding of concepts as well as learning new things. Topics will adapt based on the attendees' interests, but may include: pymarc, pandas, spaCy, pytest, csvkit, Jupyter Notebooks, typing, common python patterns, powerful but underutilized components in the standard library, (relatively) new python 3 features, asynchronous code, code editor configuration (linting, pylance), and dependency management (virtualenv, poetry, pipenv).

In general, the session is intended for people with some experience programming in python. Novice to intermediate programmers should expect to learn new techniques but also see some familiar code. Beginners may feel a bit lost during conversations, but there will be beginner exercises and instructor assistance available.

Workshop Prologue

We will abide by the Code4Lib Code of Conduct during this workshop. Please be respectful of others and their opinions. If you need to contact a Community Support Volunteer, you can do so in a number of ways:

Other bits of housekeeping here — where are the bathrooms? Water fountains? We will have a break about an hour in.

Then a round of introductions. Please share at least your name and a note about your relationship with Python, whether that's your expertise level, what kinds of coding you usually do, or something you're looking forward to talking about today.

We should attempt to take notes to share on the python4lib resources repo.

Getting Started

To get the most out of this session, attendees will need to download this repository and have Python 3. Python 3.10 should be able to utilize all features discussed but earlier versions should be able to run most of the code samples.

Links:

  • Download this repo (GitHub > Code > Download ZIP)
    • or git clone https://github.com/phette23/c4l24-python4lib on the command line
  • Python
    • brew install python if you use homebrew on macOS

The repo contains Jupyter Notebooks, which most code editors should be able to open. You can also view them on GitHub. If you're not able to run the notebooks, you can either write code into a Python script or run it in an interactive Python shell.

If you have poetry installed, you can run poetry install to create a virtual environment with all the packages mentioned in notebooks. It will include the ipykernel package needed to run code in the notebooks. To get VS Code to give you the option to choose poetry's venv as a kernel, try running mkdir .venv in this repo before running poetry install.

A requirements.txt file is also included with the packages needed to run the notebooks. Here's how you would create a virtual environment and install the packages with pip:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Topics Index

Python4Lib is an informal group that meets biweekly over Zoom. Sometimes there are presentations on particular topics, sometimes we just chat about what's going on. Notes from meetings are shared to the #python channel in the Code4Lib Slack. If you want to join the biweekly calls, ask to be added to the calendar event in the Slack channel. Approximately the first hour of this workshop will be a Python4Lib meeting, then we'll cover as much of the following as time allows.

In rough order of popularity based on a survey of attendees:

I didn't have time to prepare notebooks on a couple more popular topics, but I can share some resources:

License

CC0 Public Domain.

About

python{4}lib workshop at code4lib 2024

Resources

Stars

Watchers

Forks