본문 바로가기

반응형

개발하자

동적 쿼리 매개 변수 빠른 속도API 동적 쿼리 매개 변수 빠른 속도APIREST 웹 서비스 GET method에 동적 쿼리 파라미터를 전송해야 합니다 [아래 그림 참조]. 호스트:port/app?field1=value1&&field2=value2&... 소비자는 매개 변수를 fieldn 및 valueen까지 전송할 수 있습니다. 각 필드는 값에 매핑됩니다. 이러한 유형의 요구 사항으로는 서버 측 메서드에서 유한한 QueryParams 집합을 코딩할 수 없습니다. 나는 파이썬과 fastapi를 사용하고 있다. 감사해요. 임의 개수의 쿼리 매개 변수를 끝점에 전달하는 방법은 FastAPI에서 제공하는 클래스를 사용하는 것입니다. 엔드포인트에 전달한 모든 쿼리 매개 변수가 포함된 dict를 제공합니다. 엔드포인트를 다음과 같이 작성합니다. @a.. 더보기
빠른 속도로 파일을 업로드하는 방법API를 Panda Dataframe으로 변환하시겠습니까? 빠른 속도로 파일을 업로드하는 방법API를 Panda Dataframe으로 변환하시겠습니까?파일을 Fast에 업로드하고 싶습니다.API 백엔드를 사용하여 Pandas DataFrame으로 변환합니다. 하지만 Fast를 사용하는 방법을 이해하지 못하는 것 같습니다.API의 개체입니다. 좀 더 구체적으로 어떤 기능을 전달하면 될까요? 내 금식이야API 끝점: @app.post("/upload") async def upload_file(file: UploadFile): df = pd.read_csv("") print(df) return {"filename": file.filename} 아래에는 업로드된 파일을 빠른 속도로 변환하는 방법에 대한 다양한 옵션이 있습니다.Panda 데이터 프레임에 대한 API입니다.. 더보기
how can we add project number from variable in terraform gcp resource iam binding how can we add project number from variable in terraform gcp resource iam bindingBelow is my terraform resource. how can we add project number from variable in terraform gcp resource iam binding because if i will run same terraform for other account, i have to change it manually. resource "google_project_iam_binding" "project" { project = var.projectid role = "roles/container.admin" members = [ .. 더보기
Kubernetes 시크릿 볼륨 대 변수 Kubernetes 시크릿 볼륨 대 변수추천할 만한 사용법이 있나요? 환경 변수로 또는 볼륨 마운트를 사용하여 노출될 수 있습니다. 둘 중 하나가 다른 것보다 더 안전합니까? https://www.oreilly.com/library/view/velocity-conference-2017/9781491985335/video316233.html 환경 변수에 의해 노출된 쿠버네티스 비밀은 /proc/를 통해 호스트에서 열거될 수 있다. 이 경우 볼륨 마운트를 통해 로드하는 것이 더 안전할 수 있습니다. 저는 TMC의 답변에 동의하지만, "하지만 12가지 요소는 어떨까요??". 12F는 ENV 변수로 구성을 저장해야 하는 것처럼 보이기 때문에 볼륨 장착 비밀 사용에 대한 반대 의견이 제기되기도 한다. 첫째, 이것.. 더보기
Svelte: How to handle the custom writtable store's async init's promise in the component? Svelte: How to handle the custom writtable store's async init's promise in the component?I have several Svelte components and a custom writtable store. The store has an init function which is async and which fills the store's value with some REST API's db's table's data. My components must all subscribe to this store by using autosubscription. At subscription, init must be called. The global ide.. 더보기
Docker-Compose를 사용하여 Jupyter 노트북을 시작할 때 Docker 컨테이너 내부의 콘다 환경 활성화 Docker-Compose를 사용하여 Jupyter 노트북을 시작할 때 Docker 컨테이너 내부의 콘다 환경 활성화저는 다음과 같은 것이 있습니다. FROM continuumio/miniconda3:4.5.11 # create a new user (defaults to 'al-khawarizmi') USER root ARG username=al-khawarizmi RUN useradd --create-home --home-dir /home/${username} ${username} ENV HOME /home/${username} # switch to newly created user to avoid running container as root USER ${username} WORKDIR $HOME #.. 더보기
How to close Drawer upon button click(close) in flutter? How to close Drawer upon button click(close) in flutter?Is there a method to close drawer if clicked on a close button created on the top right corner of the drawer. Mock of drawer: Just call Navigator.of(context).pop(); Example: ListTile( title: Text('Item 1'), onTap: () { // Update the state of the app. // ... // Then close the drawer. Navigator.pop(context); }, ), References Drawer To globall.. 더보기
Flutter web asset images not displaying when deployed to web server Flutter web asset images not displaying when deployed to web serverI have created a flutter web project which uses network images and asset images, everything works fine when debugging on my pc but when I deploy it to a web server, the network images work fine but the asset images dont show at all. When I Inspect the page in the web browsers consol, I get the error below: $1 @ window.dart:120 /a.. 더보기
React with TypeScript를 사용하여 어린이를 특정 구성 요소로 제한할 수 있습니까? React with TypeScript를 사용하여 어린이를 특정 구성 요소로 제한할 수 있습니까?React with TypeScript를 사용하여 설정 또는 확장과 같이 의 유형을 정의하는 여러 가지 방법이 있습니다. 그러나 그렇게 하면 React 하위 요소가 될 수 있는 특정 요소를 추가로 제한할 수 있습니까? function ListItem() { return ( A list item ); } //-------------------- interface ListProps { children: React.ReactChild | React.ReactChild[] } function List(props: ListProps) { return ( {props.children} // what if I only w.. 더보기
Typescript d.ts 파일에 정의된 인터페이스 속성 유형을 재정의하는 중 Typescript d.ts 파일에 정의된 인터페이스 속성 유형을 재정의하는 중in type 스크립트에 정의된 인터페이스 속성 유형을 변경할 수 있는 방법이 있습니까? 예: 의 인터페이스는 다음과 같이 정의됩니다. interface A { property: number; } 내가 쓰는 스크립트 파일 형식에서 변경하고 싶다. interface A { property: Object; } 아니면 이마저도 효과가 있을 것이다. interface B extends A { property: Object; } 이 접근법이 효과가 있을까요? 내가 시스템을 사용해봤을 때 작동하지 않았다. 그게 가능한지 확인하고 싶어서요? 기존 속성의 유형을 변경할 수 없습니다. 속성을 추가할 수 있습니다. interface A { ne.. 더보기

반응형