Install an SDK
Pick the SDK for your runtime. Each one sends events to the same ingest endpoint and evaluates feature flags locally from the same rules, so a user lands in the same rollout whichever you choose.
The key in these snippets comes from the console: Get an API key
At a glance
- Packages
@prodantix/sdk(web),prodantix_sdk(Dart),prodantix_sdk_flutter(Flutter),prodantix-sdk(Python)- Credential
- The public project key: Projects & keys
- Endpoints
- Hosts and contracts: REST
Browser and Node
Bash
bun add @prodantix/sdk
# React apps also take the adapter:
bun add @prodantix/reactJavaScript
import { createWebClient } from '@prodantix/sdk/web';
const prodantix = createWebClient({
apiKey: PRODANTIX_PUBLIC_KEY,
host: 'https://eu.api.prodantix.com',
flagsHost: 'https://api.prodantix.com',
});
prodantix.capture('order.completed', { properties: { amount: 4200 } });JavaScript
import { ProdantixProvider, useProdantix } from '@prodantix/react';
<ProdantixProvider options={{ apiKey: PRODANTIX_PUBLIC_KEY, host: 'https://eu.api.prodantix.com' }}>
<App />
</ProdantixProvider>
const prodantix = useProdantix();
prodantix?.capture('order.completed');Flutter and Dart
Bash
flutter pub add prodantix_sdk_flutter
# Dart server or CLI, without the Flutter layer:
dart pub add prodantix_sdkPython server
Bash
pip install prodantix-sdkYour project key is public: it names the project, it grants no access to its data, so it belongs in client code. A server key, which can write, never does.
Where to go next
Quickstart: capture a first event and read it back. Each package’s full surface is under Packages, and framework wiring (React, Vue, Svelte, Angular) under Frameworks.