Skip to content
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

Merged
merged 10 commits into from
Jul 21, 2021
Merged

Endpoints #11

merged 10 commits into from
Jul 21, 2021

Conversation

vvrubel
Copy link
Owner

@vvrubel vvrubel commented Jul 16, 2021

ручка /v1/compounds готова

@vvrubel vvrubel requested a review from churnikov July 18, 2021 15:37
@churnikov churnikov changed the base branch from master to db_requests2 July 19, 2021 06:58
molecad/api.py Outdated
class Properties(BaseModel):
CID: int
MolecularFormula: str
MolecularWeight: Union[float, str] # почему-то в response приходит строка
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может ты в базу что-то не то пишешь?..

Copy link
Owner Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему решила убрать property?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему решила убрать property?

ну типа это действие, а не свойство по смыслу, если не права поправь

@vvrubel vvrubel requested a review from churnikov July 20, 2021 07:45
from .settings import Settings, settings


# settings = Settings(_env_file="prod.env", _env_file_encoding="utf-8")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Collaborator

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}"
Copy link
Collaborator

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)

@vvrubel vvrubel changed the base branch from db_requests2 to master July 21, 2021 10:43
@vvrubel vvrubel merged commit 65e5f9c into master Jul 21, 2021
@vvrubel vvrubel deleted the endpoints branch August 8, 2021 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants