Python client for Firebase Dynamic Links API
Project description
Firebase Dynamic Links python client
Simple python client to generate Firebase Dynamic Links. It allows to use a custom domain and fields for generate links for android and ios.
Requirements
- Python >= 3.4
- PIP
- API Key from Firebase console Settings page.
Installation
pip install py-firebase-dynamic-links
Usage
from firebase_dynamic_links import DynamicLinks
api_key = 'your_api_key'
domain = 'example.page.link'
timeout = 10
dl = DynamicLinks(api_key, domain, timeout) # or DynamicLinks(api_key, domain)
params = {
"androidInfo": {
"androidPackageName": 'packagename',
"androidFallbackLink": 'fallbacklink',
"androidMinPackageVersionCode": '1'
},
}
# dl.generate_dynamic_link(url_to_redirect, create_short_url, params) or
# dl.generate_dynamic_link(url_to_redirect)
short_link = dl.generate_dynamic_link('http://google.es', True, params) #https://example.page.link/h77c
api_key
: Key from firebase consoledomain
: Domain uri prefix created in firebase console. For exampleexample.page.link
or your custom domain.timeout
: Timeout for the api callparams
: Dictionary of optional params. For example:
{
"androidInfo": {
"androidPackageName": string,
"androidFallbackLink": string,
"androidMinPackageVersionCode": string
},
"iosInfo": {
"iosBundleId": string,
"iosFallbackLink": string,
"iosCustomScheme": string,
"iosIpadFallbackLink": string,
"iosIpadBundleId": string,
"iosAppStoreId": string
}
}
Reference
https://firebase.google.com/docs/dynamic-links/rest
https://firebase.google.com/docs/reference/dynamic-links/link-shortener
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file py-firebase-dynamic-links-1.0.1.tar.gz
.
File metadata
- Download URL: py-firebase-dynamic-links-1.0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8345533ee1b9c33b88363ea5a540eb7048008218afd55e6b72f4d4b1995f362 |
|
MD5 | 5924c880d42eab91193703966c68e73d |
|
BLAKE2b-256 | 6724f46e427c32215d242be84ca2884cced1af15612ebd47f96897355b42968b |