> For the complete documentation index, see [llms.txt](https://docs.justpush.io/introduction/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.justpush.io/introduction/dev-tools/sdks.md).

# SDKs

{% hint style="info" %}
Are you missing an SDK? Feel free to contribute one, and we will reward you with a lifetime license for creating and maintaining the library.
{% endhint %}

{% hint style="success" %}
Using Laravel, Magento or PrestaShop? There are ready-made [packages](/introduction/packages/packages.md) for those, so you don't need to write the integration yourself.
{% endhint %}

<details>

<summary>PHP</summary>

A general PHP library that can be used in any PHP product.

**Official:**

* **Source**: <https://github.com/JustPush-io/justpush-sdk-php>
* **Packagist**: <https://packagist.org/packages/justpush/justpush-php-sdk>

```bash
composer require justpush/justpush-php-sdk
```

```php
$response = JustPushMessage::token('YOUR_API_TOKEN')
    ->message('The nightly backup finished')
    ->title('Backups')
    ->create();
```

</details>

<details>

<summary>Javascript</summary>

A general Javascript library that can be used in any Javascript product.

**Official:**

* **Source**: <https://github.com/JustPush-io/justpush-sdk-js>
* **NPM**: <https://www.npmjs.com/package/@justpush.io/justpush-js-sdk>

</details>

<details>

<summary>TypeScript</summary>

A general TypeScript library that can be used in any TypeScript application.

**Official:**

* **Source**: <https://github.com/JustPush-io/justpush-sdk-ts>
* **NPM**: <https://www.npmjs.com/package/@justpush.io/justpush-ts-sdk>

</details>

<details>

<summary>Python</summary>

A Python library for scripts, servers and Home Assistant integrations. It has a sync client that only uses the standard library, and an async client built on `aiohttp`. Python 3.10 or newer.

**Official:**

* **Source**: <https://github.com/JustPush-io/justpush-sdk-python>
* **PyPI**: <https://pypi.org/project/justpush/>

```bash
pip install justpush
```

```python
from justpush import JustPush, Priority

client = JustPush("YOUR_API_TOKEN")
result = client.send(
    "The nightly backup finished",
    title="Backups",
    topic="Servers",
    priority=Priority.HIGH,
)

print(result.key)                    # use it with client.get_message()
print(result.rate_limit.remaining)   # messages left this month
```

The SDK checks the message before sending, so an invalid value raises `JustPushValidationError` instead of making a request. `client.verify_token()` checks an API token without sending a message or using quota. For async code, use `AsyncJustPush`, which can share your own `aiohttp.ClientSession`.

</details>

<details>

<summary>Go</summary>

A Go library for programs, servers and CLIs. It only uses the standard library and has no dependencies. Go 1.21 or newer.

**Official:**

* **Source**: <https://github.com/JustPush-io/justpush-go-sdk>
* **Go packages**: <https://pkg.go.dev/github.com/JustPush-io/justpush-go-sdk>

```bash
go get github.com/JustPush-io/justpush-go-sdk
```

```go
import "github.com/JustPush-io/justpush-go-sdk"

client, err := justpush.New("YOUR_API_TOKEN")
if err != nil {
    log.Fatal(err)
}

result, err := client.Send(ctx, &justpush.Message{
    Title:    "Backups",
    Message:  "The nightly backup finished",
    Topic:    "Servers",
    Priority: justpush.PriorityHigh,
})
if err != nil {
    log.Fatal(err)
}

fmt.Println(result.Key)                 // use it with client.GetMessage()
fmt.Println(result.RateLimit.Remaining) // messages left this month
```

Every method takes a `context.Context`, and a `Client` is safe to share between goroutines. Errors work with `errors.Is` and `errors.As`. For example, `client.VerifyToken(ctx)` returns `justpush.ErrUnauthorized` for an invalid token, without sending a message or using quota.

</details>

### What the SDKs support

The PHP, Python and Go SDKs cover the full [Messages](/introduction/objects/messages.md) and [Topics](/introduction/objects/topics.md) API:

* Title, message, topic (by name or by topic token), priority and sound
* Up to 10 buttons and up to 4 button groups
* Up to 10 images, from a URL, raw bytes or a file
* Expiry (TTL) and acknowledgements with retries and a callback URL
* Looking up a sent message by its key
* Creating, updating and fetching topics
