Python wallpaper for Humans.
Project description
wallpaper
Get or set the desktop wallpaper
Works on macOS 10.12+ and Windows 10+, inspired by wallpaper node
Install
only python3 is supported
pip install py-wallpaper
Usage
from wallpaper import get_wallpaper, set_wallpaper
# get current wallpaper's path
print(get_wallpaper())
# /Users/leetao/Workspace/py/wallpaper/tests/bg.jpg # your wallpaper path
# set your photo
set_wallpaper("your photo's path")
API
get_wallpaper(**options)
Returns the path of the current desktop wallpaper.
param::options->dict
screen *(macOS only)* -> str
values: `'all'`, `'main'`
default: `'main'`
The screen to get the wallpaper from. If you set 'all'
then .get_wallpaper
will return a list.
set_wallpaper(image_path, **options)
Returns a object.
param::image_path -> str
The path to the image to set as the desktop wallpaper.
param::options -> dict
screen *(macOS only)* -> str
values: `'all'`, `'main'`, or the index of a screen from `.screens()`
default: `'all'`
The screen to set the wallpaper on.
param::scale *(macOS only)* -> str
values: `'auto' | 'fill' | 'fit' | 'stretch' | 'center'`
default: `'auto'`
Scaling method.
TODO
wallpaper on Linux
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-wallpaper-0.1.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for py_wallpaper-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9876c74913df1867522fd955e42da52e5be5f70474889305cfacf727cfcbde0e |
|
MD5 | 3bc58cb94c51d3eaf5c7a821d3279ff1 |
|
BLAKE2b-256 | 2171aeba0bf411f4e15a6df9ffdcc1b6dfc4e385bdd4c00ea982e5b0e908ee7c |