Skip to main content

Python wallpaper for Humans.

Project description

wallpaper

Get or set the desktop wallpaper

license-apache2 python3+

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


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)

Uploaded Source

Built Distribution

py_wallpaper-0.1.0-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page