axiomhq / axiom-py

Official Python bindings for the Axiom API
https://axiom.co
MIT License
27 stars 19 forks source link

feat(axiom-py): Add support for creating and deleting API tokens #115

Closed WRansohoff closed 3 months ago

WRansohoff commented 3 months ago

Summary

This PR adds support for creating and deleting API tokens using the axiom-py package.

The dataclasses for request and response structures are in a new axiom/tokens.py file, and the API calls themselves are in the client logic.

Test Plan

Using a test script, call the create_api_token function to create a new token with arbitrary attributes. Check that the token was created in Axiom, then delete it with the delete_api_token function.

I added a pytest, too.

WRansohoff commented 3 months ago

Whoops, sorry - meant to submit this PR to our fork of the package. Happy to re-open it if you like the change, though!