Skip to main content

Official Python SDK for Finnear - Push notification platform for founders & developers

Project description

Finnear Python SDK

Official Python SDK for Finnear - Push notification platform for founders & developers.

Installation

pip install finnear

Quick Start

from finnear import Finnear, EventPayload

client = Finnear(api_key="your-api-key")

result = client.track(EventPayload(
    channel="signups",
    title="New user signed up",
    description="user@example.com",
    emoji="🙋",
    metadata={"plan": "pro"},
))

print(result.event_id)

API

Finnear(api_key, base_url?)

Option Type Required Description
api_key str Yes Your Finnear API key
base_url str No Custom API base URL

client.track(event)

Send an event to Finnear. Returns an EventResponse with event_id.

Field Type Required Description
channel str Yes Event channel
title str Yes Event title
description str No Event description
emoji str No Event emoji icon
user_id str No Associated user ID
metadata dict[str, str] No Key-value metadata

Error Handling

from finnear import Finnear, EventPayload, AuthenticationError, ValidationError, ApiError

try:
    client.track(EventPayload(channel="signups", title="New user"))
except AuthenticationError:
    # Invalid API key (401)
    pass
except ValidationError:
    # Invalid payload (400)
    pass
except ApiError as e:
    # Other HTTP error
    print(e.status, str(e))

Requirements

  • Python 3.10+
  • No external dependencies

License

MIT

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

finnear-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

finnear-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file finnear-0.1.0.tar.gz.

File metadata

  • Download URL: finnear-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for finnear-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08165f096678e036a02de8a266118791f1a632d2dd38c3d646f95814749c076a
MD5 13ac51aee5ce824f3a57f11612e217cf
BLAKE2b-256 482c8c2887d8a918714156f4f708bbd83adcd5b7027934caa371b45cb30d054f

See more details on using hashes here.

File details

Details for the file finnear-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: finnear-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for finnear-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad898e86a1134866fffd2d1c62973b54e697fbd0378d15b125cbe2bf17a267e1
MD5 3006d1841c7d729a37d90325e0446287
BLAKE2b-256 61a396b29edd484f83c51e8b2e3dde5d6f3f262fd14fcc0e8151001c27558aa9

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