Skip to main content

Use the combined power of the official Meetup API and a web scraper to implement Meetup into your project.

Project description

Meetup-API

Use the combined power of the official Meetup API and a web scraper to implement Meetup into your project.

Want to support the development financially? Donations are always welcomed! Click here to donate on Liberapay

Installation

pip install MeetupAPI

Usage

from MeetupAPI import Meetup

API credentials optional

Meetup().events()

Based on https://www.meetup.com/meetup_api/docs/:urlname/events/#list

Meetup().events() will return a JSON with events from the group you enter. By default it returns the first 10.000 events of the group.

Required inputs for Meetup():

groupname = str

Optional inputs for .events():

results_per_page = int
pages = 'all' or int ('all' is default)
maximum_num_results = int
fields = list

API credentials required

Meetup().upcoming_events()

Based on https://www.meetup.com/meetup_api/docs/find/upcoming_events/

Will return a list of upcoming events on Meetup.

Required inputs for Meetup():

groupname = str
client_id = str
client_secret = str
redirect_uri = str

Optional inputs for .upcoming_events():

results_per_page = int
pages = 'all' or int ('all' is default)
maximum_num_results = int
city = str (Example: 'Berlin, Germany' or 'New York, NY')
lat = float
lon = float
text = str
topic_category = int
min_num_attendees = int
filter = list (options are: 
    'online_meetups' -> filters for online meetups, on zoom, skype, jitsi, etc.
    'lang:{language short code}' -> filter for events who's title is in the language you define. Example: 'lang:en' or 'lang:de'
    'group_urls_only' -> returns urls of groups instead of events as json

Meetup().create()

Based on https://www.meetup.com/meetup_api/docs/:urlname/events/#create

If successfull, Meetup().create() will return the event it was given, but with the meetup link as event.url_meetup_event. If the request fails, Meetup().create returns None.

Required inputs for Meetup():

groupname = str
client_id = str
client_secret = str
redirect_uri = str

Optional inputs for Meetup():

default_space_name = str
default_space_address_street = str
default_space_address_zip = str
default_space_address_city = str
default_space_address_countrycode = str
default_space_how_to_find_us = str
default_space_timezonestring = str

Required inputs for .create():

event = Event class (with fields 
    'str_name_en_US',
    'text_description_en_US',
    'int_minutes_duration',
    'float_lat',
    'float_lon',
    'str_name_en_US',
    'int_UNIXtime_event_start',
    'url_meetup_event' 
    and Event.save() function)

Optional inputs for .create():

announce = boolean (announces the event to group members on meetup)
publish_status = 'draft' or 'published' (default is 'draft')

Meetup().delete()

Based on https://www.meetup.com/meetup_api/docs/:urlname/events/#delete

If successfull, Meetup().delete() will return the event it was given, but with event.url_meetup_event = None. If the request fails, Meetup().delete returns None.

Required inputs for Meetup():

groupname = str
client_id = str
client_secret = str
redirect_uri = str

Required inputs for .delete():

event = Event class (with field 'url_meetup_event' and Event.save() function)

Meetup().message()

Meetup().message() can send a message (including optional placeholders) to one or multiple other users.

Required inputs for .message():

receiver_members = dict or list (Example: {'name':'xxxx','id':'yyyy'})
message = str

Optional inputs for .message():

json_placeholders = list (with json entries in this scheme: {'keyword':xxxx,'replace_with':yyyyy})
save_log = boolean
log_path = str (default: 'sent_messages_log.json')
spam_prevention = boolean (default: True, prevents sending the same message multiple times to the same user or sending too many messages in a short time period to the same user)
spam_prevention_wait_time_minutes = int (default: 1440)
test = boolean (default: False, makes a screenshot of the message instead of sending the message)
auto_close_selenium = boolean (default: True, closes the web browser when finished with sending a message)
scraper = PyWebScraper class (default: None, needed if you want to send multiple messages in the same browser window)

Meetup().message_group_organizer()

Meetup().message_group_organizer() can message the group organizers from all groups of all upcoming events in selected cities. Have in mind that there is a limit of 20 messages/day integrated into this function, to prevent you getting blocked by Meetup.

Optional inputs for .message_group_organizer():

message = str (default: None)
message_path = str (default: 'message_to_organizer.txt', create a text file in that path to define a message which will be send)
cities = list (default: [
                        'San Francisco, CA',
                        'Los Angeles, CA',
                        'New York, NY',
                        'Seattle, WA',
                        'Boston, MA',
                        'Chicago, IL',
                        'Detroit, Michigan',
                        'Washington, DC',
                        'Miami, FL',
                        'Toronto, Canada',
                        'Barcelona, Spain',
                        'Madrid, Spain',
                        'Paris, France',
                        'Rome, Italy',
                        'Milano, Italy',
                        'London, UK',
                        'Berlin, Germany',
                        'Munich, Germany',
                        'Vienna, Austria',
                        'Amsterdam, Netherlands',
                        'Singapore, Singapore',
                        'Hong Kong, Hong Kong',
                        'Tokyo, Japan',
                        'Seoul, South Korea'
                    ])
cities_processed_path = str (default: 'processed_cities.json', where the progress of processed cities will be saved)
maximum_num_results = int (default: 20, how many group organizer per city should be messaged. Have in mind: the daily messaging limit is 20)
filters = list (default: ['online_meetups', 'lang:en'], filters for upcoming_events, from which the group organizers will be collected)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MeetupAPI-1.4.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

MeetupAPI-1.4.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file MeetupAPI-1.4.0.tar.gz.

File metadata

  • Download URL: MeetupAPI-1.4.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for MeetupAPI-1.4.0.tar.gz
Algorithm Hash digest
SHA256 ddce4bd1a11357a39589527f04cee8b7c45dfffab9c9d98262dece4f7c618490
MD5 699dc1a3053ffa03161ccc7a65e87298
BLAKE2b-256 864bf1cf968eaeead40797018e77267a044c8301e9ade58a083a854e65dc7438

See more details on using hashes here.

File details

Details for the file MeetupAPI-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: MeetupAPI-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for MeetupAPI-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8cc51d163bb511f79b7701941cbbc768c27cee7ff1117ae10097bfb6adb9f7a
MD5 2874e363dc2d2a28cd98d65a508c23a9
BLAKE2b-256 2f2f8ebf12c645e1a9b6a07a8e2df4fe5256118b43f7b77b4f78c70d70ec31fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page