Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added backend/__pycache__/app.cpython-312.pyc
Binary file not shown.
66 changes: 66 additions & 0 deletions backend/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# backend/app.py

from flask import Flask, jsonify, request
from flask_cors import CORS
import requests

# Initialize the Flask App
app = Flask(__name__)

# Apply CORS to your app to allow frontend requests
CORS(app)

GITHUB_API_URL = "https://api.github.com/search/issues"

@app.route("/api/gfi", methods=["GET"])
def get_gfi_issues():
# Get the 'language' parameter from the request URL (e.g., /api/gfi?language=Python)
language = request.args.get("language", None)

# Base query to find open "good first issues"
query = "label:\"good first issue\" state:open"

# If a language is specified, add it to the query
if language:
query += f" language:{language}"

# Parameters for the GitHub API request
params = {
"q": query,
"sort": "updated",
"order": "desc",
"per_page": 20 # Fetch 20 issues per request
}

headers = {"Accept": "application/vnd.github+json"}

try:
response = requests.get(GITHUB_API_URL, headers=headers, params=params)
response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)
data = response.json()

issues = []
for item in data.get("items", []):
# Extract repository name from its URL
repo_name = item.get("repository_url", "").split("/")[-1]

issues.append({
"title": item.get("title"),
"url": item.get("html_url"),
"repository": repo_name,
"labels": [label.get("name") for label in item.get("labels", [])]
})

return jsonify({
"language_filter": language or "any",
"count": len(issues),
"issues": issues
})

except requests.exceptions.RequestException as e:
# Handle API request errors gracefully
return jsonify({"error": str(e)}), 500

# This part allows you to run the app directly with 'python app.py'
if __name__ == "__main__":
app.run(debug=True, port=5000) # Runs on http://localhost:5000
13 changes: 13 additions & 0 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "backend",
"version": "1.0.0",
"description": "",
"license": "ISC",
"author": "",
"type": "commonjs",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
}
Binary file added backend/requirements.txt
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip
20 changes: 20 additions & 0 deletions backend/venv/Lib/site-packages/blinker-1.9.0.dist-info/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright 2010 Jason Kirtland

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
60 changes: 60 additions & 0 deletions backend/venv/Lib/site-packages/blinker-1.9.0.dist-info/METADATA
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Metadata-Version: 2.3
Name: blinker
Version: 1.9.0
Summary: Fast, simple object-to-object and broadcast signaling
Author: Jason Kirtland
Maintainer-email: Pallets Ecosystem <[email protected]>
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Typing :: Typed
Project-URL: Chat, https://discord.gg/pallets
Project-URL: Documentation, https://blinker.readthedocs.io
Project-URL: Source, https://github.com/pallets-eco/blinker/

# Blinker

Blinker provides a fast dispatching system that allows any number of
interested parties to subscribe to events, or "signals".


## Pallets Community Ecosystem

> [!IMPORTANT]\
> This project is part of the Pallets Community Ecosystem. Pallets is the open
> source organization that maintains Flask; Pallets-Eco enables community
> maintenance of related projects. If you are interested in helping maintain
> this project, please reach out on [the Pallets Discord server][discord].
>
> [discord]: https://discord.gg/pallets


## Example

Signal receivers can subscribe to specific senders or receive signals
sent by any sender.

```pycon
>>> from blinker import signal
>>> started = signal('round-started')
>>> def each(round):
... print(f"Round {round}")
...
>>> started.connect(each)

>>> def round_two(round):
... print("This is round two.")
...
>>> started.connect(round_two, sender=2)

>>> for round in range(1, 4):
... started.send(round)
...
Round 1!
Round 2!
This is round two.
Round 3!
```

12 changes: 12 additions & 0 deletions backend/venv/Lib/site-packages/blinker-1.9.0.dist-info/RECORD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
blinker-1.9.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
blinker-1.9.0.dist-info/LICENSE.txt,sha256=nrc6HzhZekqhcCXSrhvjg5Ykx5XphdTw6Xac4p-spGc,1054
blinker-1.9.0.dist-info/METADATA,sha256=uIRiM8wjjbHkCtbCyTvctU37IAZk0kEe5kxAld1dvzA,1633
blinker-1.9.0.dist-info/RECORD,,
blinker-1.9.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
blinker/__init__.py,sha256=I2EdZqpy4LyjX17Hn1yzJGWCjeLaVaPzsMgHkLfj_cQ,317
blinker/__pycache__/__init__.cpython-312.pyc,,
blinker/__pycache__/_utilities.cpython-312.pyc,,
blinker/__pycache__/base.cpython-312.pyc,,
blinker/_utilities.py,sha256=0J7eeXXTUx0Ivf8asfpx0ycVkp0Eqfqnj117x2mYX9E,1675
blinker/base.py,sha256=QpDuvXXcwJF49lUBcH5BiST46Rz9wSG7VW_p7N_027M,19132
blinker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4 changes: 4 additions & 0 deletions backend/venv/Lib/site-packages/blinker-1.9.0.dist-info/WHEEL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: flit 3.10.1
Root-Is-Purelib: true
Tag: py3-none-any
17 changes: 17 additions & 0 deletions backend/venv/Lib/site-packages/blinker/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from __future__ import annotations

from .base import ANY
from .base import default_namespace
from .base import NamedSignal
from .base import Namespace
from .base import Signal
from .base import signal

__all__ = [
"ANY",
"default_namespace",
"NamedSignal",
"Namespace",
"Signal",
"signal",
]
Binary file not shown.
Binary file not shown.
Binary file not shown.
64 changes: 64 additions & 0 deletions backend/venv/Lib/site-packages/blinker/_utilities.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from __future__ import annotations

import collections.abc as c
import inspect
import typing as t
from weakref import ref
from weakref import WeakMethod

T = t.TypeVar("T")


class Symbol:
"""A constant symbol, nicer than ``object()``. Repeated calls return the
same instance.
>>> Symbol('foo') is Symbol('foo')
True
>>> Symbol('foo')
foo
"""

symbols: t.ClassVar[dict[str, Symbol]] = {}

def __new__(cls, name: str) -> Symbol:
if name in cls.symbols:
return cls.symbols[name]

obj = super().__new__(cls)
cls.symbols[name] = obj
return obj

def __init__(self, name: str) -> None:
self.name = name

def __repr__(self) -> str:
return self.name

def __getnewargs__(self) -> tuple[t.Any, ...]:
return (self.name,)


def make_id(obj: object) -> c.Hashable:
"""Get a stable identifier for a receiver or sender, to be used as a dict
key or in a set.
"""
if inspect.ismethod(obj):
# The id of a bound method is not stable, but the id of the unbound
# function and instance are.
return id(obj.__func__), id(obj.__self__)

if isinstance(obj, (str, int)):
# Instances with the same value always compare equal and have the same
# hash, even if the id may change.
return obj

# Assume other types are not hashable but will always be the same instance.
return id(obj)


def make_ref(obj: T, callback: c.Callable[[ref[T]], None] | None = None) -> ref[T]:
if inspect.ismethod(obj):
return WeakMethod(obj, callback) # type: ignore[arg-type, return-value]

return ref(obj, callback)
Loading