Skip to main content

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

Metadata

Release files for py-wallpaper 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-wallpaper 0.1.0
File Size Uploaded Provenance
py-wallpaper-0.1.0.tar.gz 2.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for py-wallpaper 0.1.0
File Interpreter ABI Platform
py_wallpaper-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / py-wallpaper-0.1.0.tar.gz

Download URL py-wallpaper-0.1.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
db7b2c60f081a7d99ed1ce15ee972b4229811483075eeb56279f733df9e9e8a3
BLAKE2b-256 checksum
How to use checksums
ca3decb9a15a60b5c396a199495866617e1e2cde5f9f0e5f0da62c52e78c866b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

Release files / py_wallpaper-0.1.0-py3-none-any.whl

Download URL py_wallpaper-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9876c74913df1867522fd955e42da52e5be5f70474889305cfacf727cfcbde0e
BLAKE2b-256 checksum
How to use checksums
2171aeba0bf411f4e15a6df9ffdcc1b6dfc4e385bdd4c00ea982e5b0e908ee7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

Security for py-wallpaper 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page