Python API wrapper around Trello's API

Overview

A wrapper around the Trello API written in Python. Each Trello object is represented by a corresponding Python object. The attributes of these objects are cached, but the child objects are not. This can possibly be improved when the API allows for notification subscriptions; this would allow caching (assuming a connection was available to invalidate the cache as appropriate).

I've created a Trello Board for feature requests, discussion and some development tracking.

Install

pip install py-trello

Usage

from trello import TrelloClient

client = TrelloClient(
    api_key='your-key',
    api_secret='your-secret',
    token='your-oauth-token-key',
    token_secret='your-oauth-token-secret'
)

Where token and token_secret come from the 3-legged OAuth process and api_key and api_secret are your Trello API credentials that are (generated here).

To use without 3-legged OAuth, use only api_key and api_secret on client.

Working with boards

all_boards = client.list_boards()
last_board = all_boards[-1]
print(last_board.name)

working with board lists and cards

all_boards = client.list_boards()
last_board = all_boards[-1]
last_board.list_lists()
my_list = last_board.get_list(list_id)

for card in my_list.list_cards():
    print(card.name)

Getting your Trello OAuth Token

Make sure the following environment variables are set:

  • TRELLO_API_KEY
  • TRELLO_API_SECRET

These are obtained from the link mentioned above.

TRELLO_EXPIRATION is optional. Set it to a string such as 'never' or '1day'. Trello's default OAuth Token expiration is 30 days.

Default permissions are read/write.

More info on setting the expiration here: https://trello.com/docs/gettingstarted/#getting-a-token-from-a-user

Run

python -m trello oauth

Required Python modules

Found in requirements.txt

Tests

To run the tests, run python -m unittest discover. Four environment variables must be set:

  • TRELLO_API_KEY: your Trello API key
  • TRELLO_TOKEN: your Trello OAuth token
  • TRELLO_TEST_BOARD_COUNT: the number of boards in your Trello account
  • TRELLO_TEST_BOARD_NAME: name of the board to test card manipulation on. Must be unique, or the first match will be used
  • TRELLO_TEST_STAR_COUNT: the number of stars on your test Trello board

WARNING: The tests will delete all cards on the board called TRELLO_TEST_BOARD_NAME!

To run tests across various Python versions, tox is supported. Install it and simply run tox from the py-trello directory.

Owner
Richard Kolkovich
Richard Kolkovich
The scope of this project will be to build a data ware house on Google Cloud Platform that will help answer common business questions as well as powering dashboards

The scope of this project will be to build a data ware house on Google Cloud Platform that will help answer common business questions as well as powering dashboards.

Shweta_kumawat 2 Jan 20, 2022
A modern Python client for controlling Wyze devices.

Python Wyze SDK A modern Python client for controlling Wyze devices. Whether you're building a custom app, or integrating into a third-party service l

Shaun Tarves 205 Jan 02, 2023
A Discord.py bot which can adjust a voice channel's bitrate depending on the number of users connected.

discord_bitrate_bot A Discord.py bot which can adjust a voice channel's bitrate depending on the number of users connected. Programmed to be run on a

1 Feb 10, 2022
An script where it logs in your instagram account and follows people and likes their posts

InstaFollower An script where it logs in your instagram account and follows people and likes their posts (uses the tags to fetch people) Requirements:

Bless 3 Nov 29, 2022
A very basic starter bot based on CryptoKKing with a small balance

starterbot A very basic starter bot based on CryptoKKing with a small balance, use at your own risk. I have since upgraded this script significantly a

Danny Kendrick 2 Dec 05, 2021
Repositório para a Live Coding do dia 22/12/2021 sobre AWS Step Functions

DIO Live Step Functions - 22/12/2021 Serviços AWS utilizados AWS Step Functions AWS Lambda Amazon S3 Amazon Rekognition Amazon DynamoDB Amazon Cloudwa

Cassiano Ricardo de Oliveira Peres 5 Mar 01, 2022
This project, search all entities related to A2P in twilio

Mirror A2P Twilio This project, search all entities related to A2P in twilio (phone numbers, messaging services, campaign, A2P brand information and P

Iván Cárdenas 2 Nov 03, 2022
Download nitro generator that generates free nitro code that you can use for Discord

Download nitro generator that generates free nitro code that you can use for Discord, run it and wait for free nitro to come

Umut Bayraktar 154 Jan 05, 2023
Download song lyrics and metadata from Genius.com 🎶🎤

LyricsGenius: a Python client for the Genius.com API lyricsgenius provides a simple interface to the song, artist, and lyrics data stored on Genius.co

John W. Miller 738 Jan 04, 2023
Minecraft checker

This Project checks if a minecraft account is a nfa/sfa account or invalid it also says you if the ip you are using is shadow banned from minecraft (shadow bann is if you send too many login attempts

baum1810 4 Oct 03, 2022
A bot which provides online/offline and player status for Thicc SMP, using Replit.

AlynaaStatus A bot which provides online/offline and player status for Thicc SMP. Currently being hosted on Replit. How to use? Create a repl on Repli

QuanTrieuPCYT 8 Dec 15, 2022
GitHub action to deploy serverless functions to YandexCloud

YandexCloud serverless function deploy action Deploy new serverless function version (including function creation if it does not exist). Inputs yc_acc

Много Лосося 4 Apr 10, 2022
Media Replay Engine (MRE) is a framework to build automated video clipping and replay (highlight) generation pipelines for live and video-on-demand content.

Media Replay Engine (MRE) is a framework for building automated video clipping and replay (highlight) generation pipelines using AWS services for live

Amazon Web Services - Labs 30 Nov 29, 2022
Discord Streaming Statut (Bot/SelfBot)

Discord-Streaming-Status Discord Streaming Status For Both User Accounts And Bot Accounts. Open your cmd and enter the command: pip install discord BE

Komuro 2 Nov 02, 2021
Algofi Python SDK is useful for developers who want to programatically interact with the Algofi lending protocol

algofi-py-sdk Algofi Python SDK Documentation https://algofi-py-sdk.readthedocs.

Algofi 41 Dec 15, 2022
D(HE)ater is a security tool can perform DoS attack by enforcing the DHE key exchange.

D(HE)ater D(HE)ater is an attacking tool based on CPU heating in that it forces the ephemeral variant of Diffie-Hellman key exchange (DHE) in given cr

Balasys 138 Dec 15, 2022
Simple integrate of API udemy.com with python

Pyudemy Simple integrate of API udemy.com with python Quick start $ pip install pyudemy or $ python setup.py install Authentication To make any calls

Hudson Brendon 30 Jan 02, 2023
Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX)

Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ AUTO BUY TOKEN ON LAUNCH AFTER ADD LIQUIDITY ⭐️ ⭐️ Support Uniswap

Crypto Trader 7 Jan 31, 2022
A collection of discord tools I've made.

Discord A collection of discord tools i've made. What's in here? Basically every discord related project i've worked on can be found here, i'll try an

?? ?? ?? 6 Nov 13, 2021