# Learning in public via Medium

**URL:** <https://forum.beeminder.com/t/learning-in-public-via-medium/12136>\
**Category:** Tech\
**Created:** [January 9, 2025, 8:29am UTC](https://forum.beeminder.com/t/learning-in-public-via-medium/12136 "2025-01-09T08:29:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![devinat1](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@devinat1](https://forum.beeminder.com/u/devinat1)\
**Post date:** [January 9, 2025, 8:29am UTC](https://forum.beeminder.com/t/learning-in-public-via-medium/12136/1 "2025-01-09T08:29:03Z")

</div>

I usually learn a lot of stuff and keep all the notes to myself. I would like to get into the habit of learning in public so that I can share and help others as well as motivate myself to learn even more! To do so, I will write more posts to [Medium](https://medium.com/). Is there a way to beemind “number of medium articles published”?

---

<div class="post-metadata">

**Author:** ![devinat1](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@devinat1](https://forum.beeminder.com/u/devinat1)\
**Post date:** [January 9, 2025, 8:38am UTC](https://forum.beeminder.com/t/learning-in-public-via-medium/12136/2 "2025-01-09T08:38:03Z")

</div>

I am experimenting with using [GitHub - weeping-angel/medium-api: Python Wrapper on top of Unofficial Medium API to quickly extract data from Medium's website.](https://github.com/weeping-angel/medium-api?tab=readme-ov-file) for now, which will allow me to get statistics on my account, a metric I can beemind.

---

<div class="post-metadata">

**Author:** ![devinat1](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@devinat1](https://forum.beeminder.com/u/devinat1)\
**Post date:** [January 9, 2025, 8:54am UTC](https://forum.beeminder.com/t/learning-in-public-via-medium/12136/3 "2025-01-09T08:54:28Z")

</div>

Here is my python code I use to create an AWS lambda:

```auto
import json
from medium_api import Medium
import os
from dotenv import load_dotenv

load_dotenv()

def lambda_handler(event, context):
        medium = Medium(os.getenv("X_RAPIDAI_API_KEY"))
        user = medium.user(username="devinat11")
        
        # Fetch articles to ensure the articles attribute is populated
        user.fetch_articles()
        
        response = {
                'fullname': user.fullname,
                'followers_count': user.followers_count,
                'articles_count': len(user.articles),
                'articles': [{'title': article.title} for article in user.articles]
        }
        
        return {
                'statusCode': 200,
                'body': json.dumps(response)
        }

```

I then, through the beeminder api, get the articles\_count which I beemind.

---

<div class="post-metadata">

**Author:** ![brennanbrown](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/brennanbrown/32/3680_2.png) [@brennanbrown](https://forum.beeminder.com/u/brennanbrown)\
**Post date:** [January 9, 2025, 8:30pm UTC](https://forum.beeminder.com/t/learning-in-public-via-medium/12136/4 "2025-01-09T20:30:31Z")

</div>

There is a relatively easy way to do this! You can join IFTTT and [integrate Medium](https://ifttt.com/medium) directly to Beeminder with that. I just began [tracking this](https://www.beeminder.com/brennanbrown/blogging) again myself!
