-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoints #11
Conversation
molecad/api.py
Outdated
class Properties(BaseModel): | ||
CID: int | ||
MolecularFormula: str | ||
MolecularWeight: Union[float, str] # почему-то в response приходит строка |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может ты в базу что-то не то пишешь?..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может ты в базу что-то не то пишешь?..
не, там от сервера строка приходит
@@ -25,7 +25,6 @@ class Config: | |||
env_file = ".env" | |||
env_file_encoding = "utf-8" | |||
|
|||
@property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему решила убрать property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему решила убрать property?
ну типа это действие, а не свойство по смыслу, если не права поправь
molecad/api_db.py
Outdated
from .settings import Settings, settings | ||
|
||
|
||
# settings = Settings(_env_file="prod.env", _env_file_encoding="utf-8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И обычно дописывают так: .env.prod
molecad/utils.py
Outdated
route = "v1/compound/summary" | ||
else: | ||
route = "v1/compound" | ||
return f"http://127.0.0.1:8000/{route}?{params}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
параметры можно так передавать requests.get(url, params=params)
ручка
/v1/compounds
готова