[updated] Webpush Notifications using ONLY Anvil and Python

Sorry for my late response, but i have some news!

I just tried out https://appilix.com/ and i converted https://servermonitoring.anvil.app/ to an actual ios app!! When i first fired up the app i could not believe my eyes.

A short but important disclaimer. Appilix has a free plan for testing only (no push notifications). I purchased the lifetime license for IOS for 49 USD, which means i can publish one IOS app to app store. For android its 29 USD.

Appilix is actually very well documented so i highly recommend trying it out!

Link to recording from my mobile.

For the push notification part, after connecting a firebase account to appilix/ios app, its possible to use appilix api. Example code which can be used in anvil server function.

import requests

# Endpoint URL
url = 'https://appilix.com/api/push-notification'

# Data to be sent in the request body
data = {
    'app_key': 'your_app_key',
    'api_key': 'your_api_key',
    'notification_title': 'Your Notification Title',
    'notification_body': 'Your Notification Body'
}

# Making the POST request
response = requests.post(url, data=data)

# Checking the response
if response.status_code == 200:
    print('Notification sent successfully!')
else:
    print('Failed to send notification. Status code:', response.status_code)

3 Likes