Skip to content
/ extsum Public

Extract the ID of a Picsum photo from its metadata

License

Notifications You must be signed in to change notification settings

streof/extsum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extsum

extsum finds the ID of a Picsum photo. For example, to obtain a random 200x300 photo, one can make a GET request to https://picsum.photos/200/300. The server will then redirect your request to the location of a random photo. If that photo happened to be, say 42, you'll get redirected to https://i.picsum.photos/id/42/200/300.jpg. The Location response header of your GET request will contain this information.

However, there is also another (less straightforward) way to obtain the ID of your photo: from its metadata. And this is exactly what extsum does.

$ git clone https://github.com/streof/extsum
$ cd extsum

# Regular install
$ pip install .

# Developer install
$ pip install -e '.[dev]'

# Get started
$ python extsum
Found ID 42

# Run tests (only developer install)
pytest -v

About

Extract the ID of a Picsum photo from its metadata

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages