python get current month

Use:

from datetime import datetime
today = datetime.today()
datem = datetime(today.year, today.month, 1)
I assume you want the first of the month.

Here is what the above code is Doing:
1. Import the datetime module.
2. Create a datetime object for today.
3. Create a datetime object for the first of the month.