No description
| templates | ||
| .gitignore | ||
| Caddyfile | ||
| Containerfile | ||
| Containerfile.aio | ||
| LICENSE | ||
| README.md | ||
| requirements.txt | ||
| wsgi.py | ||
Placeany
A quick and simple service for getting pictures of whatever-you-want for use as placeholders in your designs or code. Just put your image size (width & height) after the URL and you'll get a placeholder.
Similar URL API as Placekitten.
There is also a bookmarklet service which works the same as Horse_ebookmarklet.
Installation
First, create an image collection.
- Create the directory
./images. - Get some images, from Unsplash or similar.
- Place images in image directory.
Run as local web server
- Go to the code:
cd path/to/holder. Copyimagesfolder to it. - Create and activate a virtualenv.
- Get dependencies in place:
pip install -r requirements.txt - Start the app:
waitress-serve --host 127.0.0.1 --port 5099 wsgi:app - Go to http://localhost:5099 in your web browser.
- Done!
Run as Container
The most easy and portable way to use this is to use Docker or Podman. In this build, waitress is used for production readyness. Port 5099 is instead used.
podman build .
podman run -it -p 5099:5099 -v ./images:/app/images <container id>
If you wish to embed images in container as well, use alternate Containerfile.
podman build -f Containerfile.aio --build-arg images=./images .
podman run -it -p 5099:5099 <container id>
Example calls
# generates an image, 200px wide and 300px tall
http://localhost:5000/200/300
# generates an image in grayscale, 200px wide and 300px tall
http://localhost:5000/g/200/300