You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a dictionary where each key represents the unique ID of a group, and the corresponding value is another dictionary containing details about the group such as name, link, URL name, latitude, and longitude
# Deserializes/Loads the private key from PEM-formatted bytes to an RSA private key object, so we could perform cryptographic operations, such as signing data
21
+
"""
22
+
Deserializes and sign the private key in PEM-formatted in bytes to an RSA private key object using cryptographic operations.
# Generates a JWT: Encodes and signs the payload using RS256 and the private RSA key, forming a base64-url encoded header, payload, and signature. Then return it.
This guide provides step-by-step instructions on how to use Meetup APIs to fetch event data related to Rust programming groups. It outlines the installation of necessary packages, setting up environment variables, and executing the script to obtain event data.
5
+
6
+
### Prerequisites
7
+
Before you start, ensure you have the following:
8
+
- Python installed on your system (Python 3.8 or later recommended).
9
+
-`pip` for managing Python packages.
10
+
- Access to terminal or command line.
11
+
12
+
### Tips for Managing Python Packages
13
+
14
+
-**Virtual Environment**: Create a virtual environment using `venv` (built into Python 3) or `virtualenv`. Here's how to activate a virtual environment:
15
+
```bash
16
+
# Creating a virtual environment (for Linux/macOS)
17
+
python3 -m venv myenv
18
+
# Activating the virtual environment (for Linux/macOS)
19
+
source myenv/bin/activate
20
+
21
+
or
22
+
23
+
# Creating a virtual environment (for Windows)
24
+
python -m venv myenv
25
+
# Activating the virtual environment (for Windows)
26
+
myenv\Scripts\activate
27
+
```
28
+
-**Upgrade `pip`**: Ensure your `pip` is up-to-date to avoid installation issues with newer packages:
29
+
```bash
30
+
pip install --upgrade pip
31
+
```
32
+
33
+
### Installation
34
+
1.**Open Terminal or Command Prompt**:
35
+
Navigate to the directory `.../tools/events-automation` where `requirements.txt` file is located.
36
+
37
+
2.**Run the Installation Command**:
38
+
Execute the following command to install all the packages listed in `requirements.txt`:
39
+
```bash
40
+
pip install -r requirements.txt
41
+
```
42
+
43
+
3.**Set Up Environment Variables**:
44
+
- Create a `.env` file for project directory.
45
+
- Add the following environment variables with your actual values:
46
+
```
47
+
AUTHORIZED_MEMBER_ID=<Your_Meetup_Member_ID>
48
+
CLIENT_KEY=<Your_Meetup_Client_Key>
49
+
PRIVATE_KEY=<Your_RSA_Private_Key>
50
+
```
51
+
These values are used for authentication with the Meetup API and to generate JWT tokens securely.
52
+
53
+
### Running the Script
54
+
To fetch events, run the following command from the project directory `.../tools/events-automation`:
55
+
```bash
56
+
python main.py
57
+
```
58
+
This script performs the following operations:
59
+
- Authenticates with the Meetup API using JWT.
60
+
- Fetches data for known Rust groups from a CSV file and Meetup API.
61
+
- Filters and formats the event data into a standardized structure.
62
+
- Outputs the details of upcoming events.
63
+
64
+
### Example Output Format
65
+
The script outputs event details in the following format:
This format includes the date and time of the event, the location (virtual in this case), and links to both the organizer's profile and the event itself.
71
+
72
+
### Challenges and Considerations
73
+
-**Data Accuracy**: The script uses "Rust" as a keyword for searching groups and events. This can sometimes pull in events that merely mention Rust but aren't directly related to Rust programming in the event descriptions.
74
+
-**Event Data Completeness**: Not all events have complete venue information, especially for virtual events. The script currently ignores handling missing data, but the ideal is flagging such events for manual review or excluding them from the final output.
75
+
-**API Limitations**: The Meetup API has rate limits and other constraints that may affect how frequently you can fetch data.
0 commit comments