# Patreon Python APIv2

**URL:** <https://www.patreondevelopers.com/t/patreon-python-apiv2/4275>\
**Category:** API Feedback\
**Created:** [March 5, 2021, 7:13am UTC](https://www.patreondevelopers.com/t/patreon-python-apiv2/4275 "2021-03-05T07:13:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youfoundme001](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/youfoundme001/32/1649_2.png) [@Youfoundme001](https://www.patreondevelopers.com/u/Youfoundme001)\
**Post date:** [March 5, 2021, 7:13am UTC](https://www.patreondevelopers.com/t/patreon-python-apiv2/4275/1 "2021-03-05T07:13:56Z")

</div>

Trying to call get\_identity() using the patreon-python and I keep getting an error.

```
AttributeError: 'API' object has no attribute 'get_identity'

```

The code (directly from the github readme)  
api\_client = patreon.API(patron\_access\_token)  
patron\_response = api\_client.get\_identity(None, {‘membership’: patreon.schemas.member.Attributes.currently\_entitled\_amount\_cents})

Any feedback on how I can retrieve some of this information for the APIv2?

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [March 6, 2021, 4:14am UTC](https://www.patreondevelopers.com/t/patreon-python-apiv2/4275/2 "2021-03-06T04:14:34Z")

</div>

Python lib may not be up to date. You can cross-check the calls and endpoints from PHP lib:

> **[Patreon/patreon-php](https://github.com/Patreon/patreon-php)**
>
> Interact with the Patreon API via OAuth. Contribute to Patreon/patreon-php development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Patreon\_KD](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@Patreon\_KD](https://www.patreondevelopers.com/u/Patreon_KD)\
**Post date:** [March 13, 2021, 10:53am UTC](https://www.patreondevelopers.com/t/patreon-python-apiv2/4275/3 "2021-03-13T10:53:13Z")

</div>

The python github is out of date. Many of the functions have changed (for example - get\_campaign() changed to fetch\_campaign(). To investigate further, I would use the dir() function to see what properties the API object has:

api\_client = patreon.API(access\_token)  
print(dir(api\_client))

which returns:

[… ‘access\_token’, ‘extract\_cursor’, ‘fetch\_campaign’, ‘fetch\_campaign\_and\_patrons’, ‘fetch\_page\_of\_pledges’, ‘fetch\_user’]
