Skip to main content


aquaui

Display native dialogs, alerts, notifications, color pickers, and more with Python

GitHub Workflow Status Version PyPI - Downloads MIT Buy Me A Coffee

💥 This library is still a work in progress.

Features

  • Display dialogs
    • Dialog prompts
    • Icon support
  • Alerts
  • Choice dialogs
  • Notifications
    • Customize title, subtitle, and informational text
    • Customize icon
    • Schedulable
    • Callbacks (button pressed, reply text) – relevant stackoverflow answer
    • Fallback (AppleScript) notifications
  • Color picker
  • File/folder picker

Documentation

Find the documentation in the docs/ folder

Examples

See the examples/ directory. Feel free to make a pull request to add more examples.

Show a dialog with the buttons "Go" (default) and "No" (to cancel) with the caution icon:

from aquaui import Dialog, Buttons, Icon

buttons = Buttons(["Go", "No"], default_button="Go", cancel_button="No")
result = Dialog("Hello!").with_buttons(buttons).with_icon(Icon.CAUTION).show()

Execute functions based on the button clicked:

from aquaui import Dialog, Buttons

button_one = "One"
button_two = "Two"
buttons = Buttons([button_one, button_two])

result = Dialog("Press a button").with_buttons(buttons).show()

if result.button_returned == button_one:
  print("Button One was pressed")
elif result.button_returned == button_two:
  print("Button Two was pressed")

Display a choice dialog with the options "Netflix" and "Prime Video"

from aquaui import Choice

provider = Choice("Choose the streaming platform").with_choices(["Netflix", "Prime Video"]).show()
print(provider)

If this example interests you, check out my other library Flixpy.

Display a notification:

Warning: please read the documentation before using notifications. There are additional dependencies to install.

from aquaui.notification.native_notification import Notification

notification = (
    Notification("Hello!")
    .with_subtitle("This is the subtitle!")
    .with_informative_text("Isn't this informative?")
    .with_identity_image("assets/folder.png")  # the image on the right of the notification
    .send()
)

Schedule a notification:

from aquaui.notification.native_notification import Notification

notification = Notification("Your pizza is here!").with_delay(15).send()
# 15 seconds delay

Build setup

Clone or fork the repository, then run

poetry shell

poetry install
pre-commit install

Make changes, then run tests with

pytest tests

Ensure that all tests pass.

Recommended editor settings
{
  "python.formatting.provider": "black",
  "editor.formatOnSave": true,
  "[python]": {
    "editor.insertSpaces": true,
    "editor.detectIndentation": false,
    "editor.tabSize": 4
  },
  "python.linting.enabled": true,
  "python.linting.flake8Enabled": true,
  "python.linting.pylintEnabled": false,
  "python.pythonPath": "/Users/yourusername/.../aquaui-UIHDsdfS-py3.7"
}

License

MIT

Metadata

Release files for aquaui 0.0.1.post2

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

Source distribution (sdist)

Source distribution for aquaui 0.0.1.post2
File Size Uploaded
aquaui-0.0.1.post2.tar.gz 9.5 kB Details

Built distribution (wheel)

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

Total release size: 19.6 kB

Release files / aquaui-0.0.1.post2.tar.gz

Download URL aquaui-0.0.1.post2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
417fe82e6d4e9212e738e483bbd5a3e883bf4b264c0c3b582289b6b865f48b80
BLAKE2b-256 checksum
How to use checksums
eaf93b8219f0f604eb04865b5e3e5d59f1e1e934737beb4ead48a043886435f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.7.6 Darwin/20.1.0

Release files / aquaui-0.0.1.post2-py3-none-any.whl

Download URL aquaui-0.0.1.post2-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96a16d452d31161bd9c2186f4e0d1333636126f6669094922f485b97d3fbe5cc
BLAKE2b-256 checksum
How to use checksums
b9ee76a4df50ff67428d40a0d67dcbe8298a40d15de13d5ecaeb672da03bf045
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.7.6 Darwin/20.1.0

Release history Release notifications | RSS feed

This release

0.0.1.post2 This release

2 release files

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