arize-phoenix 4.27.0__py3-none-any.whl → 4.29.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-4.27.0.dist-info → arize_phoenix-4.29.0.dist-info}/METADATA +2 -1
- {arize_phoenix-4.27.0.dist-info → arize_phoenix-4.29.0.dist-info}/RECORD +26 -22
- phoenix/auth.py +3 -0
- phoenix/otel/__init__.py +22 -0
- phoenix/otel/otel.py +284 -0
- phoenix/otel/settings.py +82 -0
- phoenix/server/api/context.py +10 -1
- phoenix/server/api/dataloaders/dataset_example_revisions.py +3 -2
- phoenix/server/api/exceptions.py +41 -0
- phoenix/server/api/mutations/__init__.py +4 -2
- phoenix/server/api/mutations/api_key_mutations.py +29 -0
- phoenix/server/api/mutations/auth_mutations.py +65 -0
- phoenix/server/api/mutations/dataset_mutations.py +9 -8
- phoenix/server/api/mutations/experiment_mutations.py +2 -1
- phoenix/server/api/queries.py +9 -8
- phoenix/server/api/routers/v1/experiments.py +4 -4
- phoenix/server/api/schema.py +2 -0
- phoenix/server/app.py +0 -3
- phoenix/server/static/.vite/manifest.json +9 -9
- phoenix/server/static/assets/{components-1MfQimGx.js → components-BYH03rjA.js} +108 -100
- phoenix/server/static/assets/{index-B263sE2x.js → index-fqdjNpYm.js} +1 -1
- phoenix/server/static/assets/{pages-CqZDVx20.js → pages-DnbxgoTK.js} +266 -219
- phoenix/version.py +1 -1
- phoenix/server/api/routers/auth.py +0 -52
- {arize_phoenix-4.27.0.dist-info → arize_phoenix-4.29.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-4.27.0.dist-info → arize_phoenix-4.29.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-4.27.0.dist-info → arize_phoenix-4.29.0.dist-info}/licenses/LICENSE +0 -0
phoenix/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "4.
|
|
1
|
+
__version__ = "4.29.0"
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
from datetime import timedelta
|
|
3
|
-
|
|
4
|
-
from fastapi import APIRouter, Form, Request, Response
|
|
5
|
-
from sqlalchemy import select
|
|
6
|
-
from starlette.status import HTTP_204_NO_CONTENT, HTTP_401_UNAUTHORIZED
|
|
7
|
-
from typing_extensions import Annotated
|
|
8
|
-
|
|
9
|
-
from phoenix.auth import is_valid_password
|
|
10
|
-
from phoenix.db import models
|
|
11
|
-
|
|
12
|
-
router = APIRouter(include_in_schema=False)
|
|
13
|
-
|
|
14
|
-
PHOENIX_ACCESS_TOKEN_COOKIE_NAME = "phoenix-access-token"
|
|
15
|
-
PHOENIX_ACCESS_TOKEN_COOKIE_MAX_AGE_IN_SECONDS = int(timedelta(days=31).total_seconds())
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@router.post("/login")
|
|
19
|
-
async def login(
|
|
20
|
-
request: Request,
|
|
21
|
-
email: Annotated[str, Form()],
|
|
22
|
-
password: Annotated[str, Form()],
|
|
23
|
-
) -> Response:
|
|
24
|
-
async with request.app.state.db() as session:
|
|
25
|
-
if (
|
|
26
|
-
user := await session.scalar(select(models.User).where(models.User.email == email))
|
|
27
|
-
) is None or (password_hash := user.password_hash) is None:
|
|
28
|
-
return Response(status_code=HTTP_401_UNAUTHORIZED)
|
|
29
|
-
secret = request.app.state.get_secret()
|
|
30
|
-
loop = asyncio.get_running_loop()
|
|
31
|
-
if not await loop.run_in_executor(
|
|
32
|
-
executor=None,
|
|
33
|
-
func=lambda: is_valid_password(password=password, salt=secret, password_hash=password_hash),
|
|
34
|
-
):
|
|
35
|
-
return Response(status_code=HTTP_401_UNAUTHORIZED)
|
|
36
|
-
response = Response(status_code=HTTP_204_NO_CONTENT)
|
|
37
|
-
response.set_cookie(
|
|
38
|
-
key=PHOENIX_ACCESS_TOKEN_COOKIE_NAME,
|
|
39
|
-
value="token", # todo: compute access token
|
|
40
|
-
secure=True,
|
|
41
|
-
httponly=True,
|
|
42
|
-
samesite="strict",
|
|
43
|
-
max_age=PHOENIX_ACCESS_TOKEN_COOKIE_MAX_AGE_IN_SECONDS,
|
|
44
|
-
)
|
|
45
|
-
return response
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@router.post("/logout")
|
|
49
|
-
async def logout() -> Response:
|
|
50
|
-
response = Response(status_code=HTTP_204_NO_CONTENT)
|
|
51
|
-
response.delete_cookie(key=PHOENIX_ACCESS_TOKEN_COOKIE_NAME)
|
|
52
|
-
return response
|
|
File without changes
|
|
File without changes
|
|
File without changes
|