Skip to main content

A module for adding and removing startup scripts on Windows, Mac, and Linux systems

Project description

Autostarter

A Python module for managing startup scripts across different operating systems, requiring no additional dependencies.

Installation

To install the module, use pip:

pip install autostarter

Usage

You can use the "add" method to include a startup script, and the "remove" method to remove a startup script.

import autostarter
import sys

# Add a python script
script_location = '/path/to/script.py'
autostarter.add(
    script_location,
    identifier='your-app-name',
    interpreter=sys.executable
)

# Remove a startup script
autostarter.remove('your-app-name')

API Reference

add(script_location, **kwargs) -> str

Adds a startup script with the specified parameters.

Parameters:
  • script_location (str): The location of the script to be added as a startup script.
  • identifier (str, optional): An identifier for the startup script. If not provided, a random UUID will be generated.
  • system_wide (bool, optional): Make program open at start for all users. Requires root/admin privileges.
  • arguments (str, optional): CLI Arguments to provide to script.
  • interpreter (str, optional): Program to run the script with. See usage for how to run a Python script
Returns:
  • The identifier for the added startup script

remove(identifier, **kwargs) -> Union[bool, str]

Removes the startup script with the specified identifier.

Parameters:
  • identifier (str): The identifier of the startup script to be removed.
Returns:
  • True if the startup script was successfully removed, False otherwise.

Supported Operating Systems

Autostarter supports the following operating systems:

  • Windows, tested on Windows 11
  • MacOS, tested on 13.1
  • Linux, tested on Ubuntu 22.04

Contributing

If you want to contribute to Autostarter, please fork the repository and make your changes in a separate branch. Then, submit a pull request with a detailed description of your changes.

License

Autostarter is licensed under the MIT License. See LICENSE for more information.

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

autostarter-0.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autostarter-0.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file autostarter-0.0.2.tar.gz.

File metadata

  • Download URL: autostarter-0.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for autostarter-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c155f441ea8c60369a32b721cf63bf1bf148c9db16a31feba3e7d78d9131fee0
MD5 a3d70789e1016fac6575f8965d49e24b
BLAKE2b-256 7086983f79c72026a74007b322d9b3715d63b97a251bc64628d2d56984d61abb

See more details on using hashes here.

File details

Details for the file autostarter-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: autostarter-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for autostarter-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ba9616882e09689afbd52cfc934cb5b83c2333ba1889ba704c472949701b4113
MD5 06a75d30d71c8bdad1bcb95a37120603
BLAKE2b-256 c8646b08fc32fc57e59391d3f7c79b8058b69e9fe7f6899ace60ac39a4a391a1

See more details on using hashes here.

Supported by

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