Skip to content

Commit 420fa37

Browse files
committed
lock to guardrails 0.5.x; let options request through; bump version
1 parent edee436 commit 420fa37

File tree

4 files changed

+72
-69
lines changed

4 files changed

+72
-69
lines changed

guardrails_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.3"
1+
__version__ = "0.0.4"

guardrails_api/app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22
from typing import Optional
3-
from flask import Flask
3+
from flask import Flask, Response, request
44
from flask.json.provider import DefaultJSONProvider
55
from flask_cors import CORS
66
from werkzeug.middleware.proxy_fix import ProxyFix
@@ -82,6 +82,11 @@ def create_app(
8282
app.wsgi_app = ReverseProxied(app.wsgi_app)
8383
CORS(app)
8484

85+
@app.before_request
86+
def basic_cors():
87+
if request.method.lower() == 'options':
88+
return Response()
89+
8590
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1)
8691

8792
guardrails_log_level = os.environ.get("GUARDRAILS_LOG_LEVEL", "INFO")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "README.md"
1010
keywords = ["Guardrails", "Guardrails AI", "Guardrails API", "Guardrails API"]
1111
requires-python = ">= 3.8.1"
1212
dependencies = [
13-
"guardrails-ai>=0.5.6",
13+
"guardrails-ai>=0.5.6,<0.6.0",
1414
"flask>=3.0.3,<4",
1515
"Flask-SQLAlchemy>=3.1.1,<4",
1616
"Flask-Caching>=2.3.0,<3",

requirements-lock.txt

Lines changed: 64 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,116 @@
1-
aiohttp==3.9.5
1+
aiohappyeyeballs==2.4.3
2+
aiohttp==3.10.10
23
aiosignal==1.3.1
34
annotated-types==0.7.0
4-
anyio==4.4.0
5+
anyio==4.6.2.post1
56
arrow==1.3.0
6-
attrs==23.2.0
7+
attrs==24.2.0
78
blinker==1.8.2
8-
boto3==1.34.149
9-
botocore==1.34.149
9+
boto3==1.35.55
10+
botocore==1.35.55
1011
cachelib==0.9.0
11-
certifi==2024.7.4
12-
charset-normalizer==3.3.2
12+
certifi==2024.8.30
13+
charset-normalizer==3.4.0
1314
click==8.1.7
1415
colorama==0.4.6
1516
coloredlogs==15.0.1
16-
coverage==7.6.0
1717
Deprecated==1.2.14
1818
diff-match-patch==20230430
1919
distro==1.9.0
2020
Faker==25.9.2
21-
filelock==3.15.4
21+
filelock==3.16.1
2222
Flask==3.0.3
2323
Flask-Caching==2.3.0
2424
Flask-Cors==5.0.0
2525
Flask-SQLAlchemy==3.1.1
2626
fqdn==1.5.1
27-
frozenlist==1.4.1
28-
fsspec==2024.6.1
29-
googleapis-common-protos==1.63.2
27+
frozenlist==1.5.0
28+
fsspec==2024.10.0
29+
googleapis-common-protos==1.65.0
3030
griffe==0.36.9
31-
grpcio==1.65.1
32-
guardrails-ai==0.5.7
33-
guardrails-api-client==0.3.12
31+
grpcio==1.67.1
32+
guardrails-ai==0.5.15
33+
guardrails-api-client==0.3.13
3434
guardrails_hub_types==0.0.4
35-
gunicorn==22.0.0
3635
h11==0.14.0
37-
httpcore==1.0.5
38-
httpx==0.27.0
39-
huggingface-hub==0.24.2
36+
httpcore==1.0.6
37+
httpx==0.27.2
38+
huggingface-hub==0.26.2
4039
humanfriendly==10.0
41-
idna==3.7
42-
importlib_metadata==8.0.0
43-
iniconfig==2.0.0
40+
idna==3.10
41+
importlib_metadata==8.5.0
4442
isoduration==20.11.0
4543
itsdangerous==2.2.0
4644
Jinja2==3.1.4
45+
jiter==0.7.0
4746
jmespath==1.0.1
4847
joblib==1.4.2
4948
jsonpatch==1.33
5049
jsonpointer==3.0.0
5150
jsonref==1.1.0
5251
jsonschema==4.23.0
53-
jsonschema-specifications==2023.12.1
54-
langchain-core==0.2.23
55-
langsmith==0.1.93
56-
litellm==1.42.3
52+
jsonschema-specifications==2024.10.1
53+
langchain-core==0.3.15
54+
langsmith==0.1.140
55+
litellm==1.52.0
5756
lxml==4.9.4
5857
markdown-it-py==3.0.0
59-
MarkupSafe==2.1.5
58+
MarkupSafe==3.0.2
6059
mdurl==0.1.2
61-
multidict==6.0.5
60+
multidict==6.1.0
6261
nltk==3.8.1
63-
openai==1.37.1
64-
opentelemetry-api==1.26.0
65-
opentelemetry-exporter-otlp-proto-common==1.26.0
66-
opentelemetry-exporter-otlp-proto-grpc==1.26.0
67-
opentelemetry-exporter-otlp-proto-http==1.26.0
68-
opentelemetry-instrumentation==0.47b0
69-
opentelemetry-instrumentation-flask==0.47b0
70-
opentelemetry-instrumentation-wsgi==0.47b0
71-
opentelemetry-proto==1.26.0
72-
opentelemetry-sdk==1.26.0
73-
opentelemetry-semantic-conventions==0.47b0
74-
opentelemetry-util-http==0.47b0
75-
orjson==3.10.6
62+
openai==1.54.3
63+
opentelemetry-api==1.28.0
64+
opentelemetry-exporter-otlp-proto-common==1.28.0
65+
opentelemetry-exporter-otlp-proto-grpc==1.28.0
66+
opentelemetry-exporter-otlp-proto-http==1.28.0
67+
opentelemetry-instrumentation==0.49b0
68+
opentelemetry-instrumentation-flask==0.49b0
69+
opentelemetry-instrumentation-wsgi==0.49b0
70+
opentelemetry-proto==1.28.0
71+
opentelemetry-sdk==1.28.0
72+
opentelemetry-semantic-conventions==0.49b0
73+
opentelemetry-util-http==0.49b0
74+
orjson==3.10.11
7675
packaging==24.1
77-
pluggy==1.5.0
78-
protobuf==4.25.4
79-
psycopg2-binary==2.9.9
80-
pydantic==2.8.2
81-
pydantic_core==2.20.1
76+
propcache==0.2.0
77+
protobuf==5.28.3
78+
psycopg2-binary==2.9.10
79+
pydantic==2.9.2
80+
pydantic_core==2.23.4
8281
pydash==7.0.7
8382
Pygments==2.18.0
84-
PyJWT==2.8.0
85-
pytest==8.3.2
86-
pytest-mock==3.14.0
83+
PyJWT==2.9.0
8784
python-dateutil==2.9.0.post0
8885
python-dotenv==1.0.1
89-
PyYAML==6.0.1
86+
PyYAML==6.0.2
9087
referencing==0.35.1
9188
regex==2023.12.25
9289
requests==2.32.3
90+
requests-toolbelt==1.0.0
9391
rfc3339-validator==0.1.4
9492
rfc3987==1.3.8
95-
rich==13.7.1
96-
rpds-py==0.19.1
93+
rich==13.9.4
94+
rpds-py==0.21.0
9795
rstr==3.2.2
98-
ruff==0.5.5
99-
s3transfer==0.10.2
100-
setuptools==71.1.0
96+
s3transfer==0.10.3
97+
semver==3.0.2
98+
setuptools==75.3.0
10199
shellingham==1.5.4
102100
six==1.16.0
103101
sniffio==1.3.1
104-
SQLAlchemy==2.0.31
105-
tenacity==8.5.0
106-
tiktoken==0.7.0
107-
tokenizers==0.19.1
108-
tqdm==4.66.4
109-
typer==0.9.4
110-
types-python-dateutil==2.9.0.20240316
102+
SQLAlchemy==2.0.36
103+
tenacity==9.0.0
104+
tiktoken==0.8.0
105+
tokenizers==0.20.3
106+
tqdm==4.67.0
107+
typer==0.12.5
108+
types-python-dateutil==2.9.0.20241003
111109
typing_extensions==4.12.2
112110
uri-template==1.3.0
113111
urllib3==2.0.7
114-
webcolors==24.6.0
115-
Werkzeug==3.0.3
112+
webcolors==24.8.0
113+
Werkzeug==3.1.2
116114
wrapt==1.16.0
117-
yarl==1.9.4
118-
zipp==3.19.2
115+
yarl==1.17.1
116+
zipp==3.20.2

0 commit comments

Comments
 (0)