Skip to content

Commit

Permalink
lock to guardrails 0.5.x; let options request through; bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebCourier committed Nov 7, 2024
1 parent edee436 commit 420fa37
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 69 deletions.
2 changes: 1 addition & 1 deletion guardrails_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.3"
__version__ = "0.0.4"
7 changes: 6 additions & 1 deletion guardrails_api/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
from typing import Optional
from flask import Flask
from flask import Flask, Response, request
from flask.json.provider import DefaultJSONProvider
from flask_cors import CORS
from werkzeug.middleware.proxy_fix import ProxyFix
Expand Down Expand Up @@ -82,6 +82,11 @@ def create_app(
app.wsgi_app = ReverseProxied(app.wsgi_app)
CORS(app)

@app.before_request
def basic_cors():
if request.method.lower() == 'options':
return Response()

app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1)

guardrails_log_level = os.environ.get("GUARDRAILS_LOG_LEVEL", "INFO")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ readme = "README.md"
keywords = ["Guardrails", "Guardrails AI", "Guardrails API", "Guardrails API"]
requires-python = ">= 3.8.1"
dependencies = [
"guardrails-ai>=0.5.6",
"guardrails-ai>=0.5.6,<0.6.0",
"flask>=3.0.3,<4",
"Flask-SQLAlchemy>=3.1.1,<4",
"Flask-Caching>=2.3.0,<3",
Expand Down
130 changes: 64 additions & 66 deletions requirements-lock.txt
Original file line number Diff line number Diff line change
@@ -1,118 +1,116 @@
aiohttp==3.9.5
aiohappyeyeballs==2.4.3
aiohttp==3.10.10
aiosignal==1.3.1
annotated-types==0.7.0
anyio==4.4.0
anyio==4.6.2.post1
arrow==1.3.0
attrs==23.2.0
attrs==24.2.0
blinker==1.8.2
boto3==1.34.149
botocore==1.34.149
boto3==1.35.55
botocore==1.35.55
cachelib==0.9.0
certifi==2024.7.4
charset-normalizer==3.3.2
certifi==2024.8.30
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
coloredlogs==15.0.1
coverage==7.6.0
Deprecated==1.2.14
diff-match-patch==20230430
distro==1.9.0
Faker==25.9.2
filelock==3.15.4
filelock==3.16.1
Flask==3.0.3
Flask-Caching==2.3.0
Flask-Cors==5.0.0
Flask-SQLAlchemy==3.1.1
fqdn==1.5.1
frozenlist==1.4.1
fsspec==2024.6.1
googleapis-common-protos==1.63.2
frozenlist==1.5.0
fsspec==2024.10.0
googleapis-common-protos==1.65.0
griffe==0.36.9
grpcio==1.65.1
guardrails-ai==0.5.7
guardrails-api-client==0.3.12
grpcio==1.67.1
guardrails-ai==0.5.15
guardrails-api-client==0.3.13
guardrails_hub_types==0.0.4
gunicorn==22.0.0
h11==0.14.0
httpcore==1.0.5
httpx==0.27.0
huggingface-hub==0.24.2
httpcore==1.0.6
httpx==0.27.2
huggingface-hub==0.26.2
humanfriendly==10.0
idna==3.7
importlib_metadata==8.0.0
iniconfig==2.0.0
idna==3.10
importlib_metadata==8.5.0
isoduration==20.11.0
itsdangerous==2.2.0
Jinja2==3.1.4
jiter==0.7.0
jmespath==1.0.1
joblib==1.4.2
jsonpatch==1.33
jsonpointer==3.0.0
jsonref==1.1.0
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
langchain-core==0.2.23
langsmith==0.1.93
litellm==1.42.3
jsonschema-specifications==2024.10.1
langchain-core==0.3.15
langsmith==0.1.140
litellm==1.52.0
lxml==4.9.4
markdown-it-py==3.0.0
MarkupSafe==2.1.5
MarkupSafe==3.0.2
mdurl==0.1.2
multidict==6.0.5
multidict==6.1.0
nltk==3.8.1
openai==1.37.1
opentelemetry-api==1.26.0
opentelemetry-exporter-otlp-proto-common==1.26.0
opentelemetry-exporter-otlp-proto-grpc==1.26.0
opentelemetry-exporter-otlp-proto-http==1.26.0
opentelemetry-instrumentation==0.47b0
opentelemetry-instrumentation-flask==0.47b0
opentelemetry-instrumentation-wsgi==0.47b0
opentelemetry-proto==1.26.0
opentelemetry-sdk==1.26.0
opentelemetry-semantic-conventions==0.47b0
opentelemetry-util-http==0.47b0
orjson==3.10.6
openai==1.54.3
opentelemetry-api==1.28.0
opentelemetry-exporter-otlp-proto-common==1.28.0
opentelemetry-exporter-otlp-proto-grpc==1.28.0
opentelemetry-exporter-otlp-proto-http==1.28.0
opentelemetry-instrumentation==0.49b0
opentelemetry-instrumentation-flask==0.49b0
opentelemetry-instrumentation-wsgi==0.49b0
opentelemetry-proto==1.28.0
opentelemetry-sdk==1.28.0
opentelemetry-semantic-conventions==0.49b0
opentelemetry-util-http==0.49b0
orjson==3.10.11
packaging==24.1
pluggy==1.5.0
protobuf==4.25.4
psycopg2-binary==2.9.9
pydantic==2.8.2
pydantic_core==2.20.1
propcache==0.2.0
protobuf==5.28.3
psycopg2-binary==2.9.10
pydantic==2.9.2
pydantic_core==2.23.4
pydash==7.0.7
Pygments==2.18.0
PyJWT==2.8.0
pytest==8.3.2
pytest-mock==3.14.0
PyJWT==2.9.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
PyYAML==6.0.1
PyYAML==6.0.2
referencing==0.35.1
regex==2023.12.25
requests==2.32.3
requests-toolbelt==1.0.0
rfc3339-validator==0.1.4
rfc3987==1.3.8
rich==13.7.1
rpds-py==0.19.1
rich==13.9.4
rpds-py==0.21.0
rstr==3.2.2
ruff==0.5.5
s3transfer==0.10.2
setuptools==71.1.0
s3transfer==0.10.3
semver==3.0.2
setuptools==75.3.0
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
SQLAlchemy==2.0.31
tenacity==8.5.0
tiktoken==0.7.0
tokenizers==0.19.1
tqdm==4.66.4
typer==0.9.4
types-python-dateutil==2.9.0.20240316
SQLAlchemy==2.0.36
tenacity==9.0.0
tiktoken==0.8.0
tokenizers==0.20.3
tqdm==4.67.0
typer==0.12.5
types-python-dateutil==2.9.0.20241003
typing_extensions==4.12.2
uri-template==1.3.0
urllib3==2.0.7
webcolors==24.6.0
Werkzeug==3.0.3
webcolors==24.8.0
Werkzeug==3.1.2
wrapt==1.16.0
yarl==1.9.4
zipp==3.19.2
yarl==1.17.1
zipp==3.20.2

0 comments on commit 420fa37

Please sign in to comment.