Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

geekbot-api-py

All Contributors

A Geekbot (https://geekbot.com/) API client in python supporting async and sync operations.

Implements the Geekbot API per https://geekbot.com/developers/

Latest Commit
Package version

Main Dependencies

Getting Started

Installation

Install the package

pip install geekbot-api

Usage

Follow the directions on https://geekbot.com/developers/ to get an API Token

Example

from geekbot_api.config import GeekbotAPIConfig
from geekbot_api.client import GeekbotAPIClient

config = GeekbotAPIConfig(api_key="api_YOURKEYGOESHERE")

client = GeekbotAPIClient(config=config)

for standup in client.standups.list():
    standups.append(standup)

    print(standups)

Async Example

import asyncio
from geekbot_api.config import GeekbotAPIConfig
from geekbot_api.client import GeekbotAPIClient

config = GeekbotAPIConfig(api_key="api_YOURKEYGOESHERE")

client = GeekbotAPIClient(config=config)

async def print_standups():
    standups = list()
    async for standup in client.async_standups.list():
        standups.append(standup)

    print(standups)

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(print_standups())

Reporting to a standup using schemas

import asyncio
from geekbot_api.config import GeekbotAPIConfig
from geekbot_api.client import GeekbotAPIClient
from geekbot_api.schemas import ReportIn

config = GeekbotAPIConfig(api_key="api_YOURKEYGOESHERE")

client = GeekbotAPIClient(config=config)
standup_id = "12345" # Your standup id
answers = dict() # keys are question ids, values are a dict responding to the question
answers['123'] = {'text': "My first answer"}
answers['234'] = {'text': "My second answer"}

report_in = ReportIn(standup_id=standup_id, answers=answers) # pydantic will validate your inputs
report = client.reports.create(report_in)
print(report)

Development

The Makefile has useful targets to help setup your development encironment. We suggest using pyenv to have access to multiple python versions easily.

Environment Setup

  • Clone the repo and enter its root folder

    git clone https://github.com/andrewthetechie/geekbot-api-py.git && cd geekbot-api-py
    
  • Create a python 3.11 virtual environment and activate it. We suggest using pyenv to easily setup multiple python environments on multiple versions.

  • Install the dependencies

    make setup
    

How to Run Tests

  • Run the test command to run tests on only python 3.9

    pytest
    
  • Run Nox to run all python version tests

    nox -s tests
    

Test Requirements

Prs should always have tests to cover the change being made. Code coverage goals for this project are 100% coverage.

Code Linting

Code is linted with ruff

You can run the linting manually with make

make lint

CI

CI is run via Github Actions on all PRs and pushes to the main branch.

Releases are automatically released by Github Actions to Pypi.

License

Licensed under the MIT License

Contributors

Thanks go to these wonderful people (emoji key):

Andrew
Andrew

💻 📖 ⚠️
David
David

💻 🐛
rmathew8-gh
rmathew8-gh

💻 ⚠️

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Metadata

Release files for geekbot-api 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geekbot-api 0.2.1
File Size Uploaded
geekbot_api-0.2.1.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geekbot-api 0.2.1
File Interpreter ABI Platform
geekbot_api-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / geekbot_api-0.2.1.tar.gz

Download URL geekbot_api-0.2.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5a7c9061331497a7fe5daac2b3d15597b8d5ba095febca37c7d244102687a436
BLAKE2b-256 checksum
How to use checksums
060142e721e550b0f60ffa8690fbfd016506654143a76e3b0dafb84b385a7b41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release files / geekbot_api-0.2.1-py3-none-any.whl

Download URL geekbot_api-0.2.1-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4da8bd5e8c12358774a247270aff449aa298c45acce9d878a69132d2ccae3dc
BLAKE2b-256 checksum
How to use checksums
1e3e337d075ab1c81ff5f570f57ba42c1c132c02d32fd64975be11e018b7e4d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page