Skip to main content

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.

Metadata

Release files for autostarter 0.0.2

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

Source distribution (sdist)

Source distribution for autostarter 0.0.2
File Size Uploaded
autostarter-0.0.2.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autostarter 0.0.2
File Interpreter ABI Platform
autostarter-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / autostarter-0.0.2.tar.gz

Download URL autostarter-0.0.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c155f441ea8c60369a32b721cf63bf1bf148c9db16a31feba3e7d78d9131fee0
BLAKE2b-256 checksum
How to use checksums
7086983f79c72026a74007b322d9b3715d63b97a251bc64628d2d56984d61abb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.8

Release files / autostarter-0.0.2-py3-none-any.whl

Download URL autostarter-0.0.2-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba9616882e09689afbd52cfc934cb5b83c2333ba1889ba704c472949701b4113
BLAKE2b-256 checksum
How to use checksums
c8646b08fc32fc57e59391d3f7c79b8058b69e9fe7f6899ace60ac39a4a391a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

1 release file

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