Skip to main content

forecast weather

Project description

weather-query

크라우드웍스 사전과제

환경 설정

1. install rye

install documentation

Linux

curl -sSf https://rye-up.com/get | bash
echo 'source "$HOME/.rye/env"' >> ~/.bashrc
source ~/.bashrc

Windows
see install documentation

2. Create virtual environment

1 pyproject.toml 파일을 만들고 다음과 같이 작성합니다.

# pyproject.toml
dependencies = [
    "jinja2>=3.1.3",
    "flake8>=7.1.1",
    "black>=24.10.0",
    "fastapi>=0.115.0",
    "isort>=5.13.2",
    "uvicorn>=0.31.1",
    "googletrans==4.0.0rc1",
    "ipython>=8.28.0",
    "python-dotenv>=1.0.1",
    "python-multipart>=0.0.12",
    "requests>=2.32.3",
    "markdown>=3.7",
]
  1. 가상환경을 만듭니다.
rye sync

코드 구현

import weather_query

result = weather_query.query("내일 서울 날씨 어때?")

print(result)

실행하면 다음과 같이 문자열이 출력됩니다.

2024년 11월 05일 서울 날씨는 구름조금입니다.

웹 서버 실행하기

API 서버는 다음과 같이 실행합니다.

rye run uvicorn app.server:app --host=127.0.0.1 --port=8000 --reload

폴더 구성

├── app
│   ├── __pycache__
│   ├── server.py
│   └── templates
├── main.py
├── pyproject.toml
├── requirements-dev.lock
├── requirements.lock
├── tests
│   ├── __pycache__
│   └── test_query.py
└── weather_forecast
    ├── __init__.py
    ├── __pycache__
    ├── client.py
    ├── preprocess.py
    └── setting.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weather-query-test-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weather_query_test-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file weather-query-test-0.0.1.tar.gz.

File metadata

  • Download URL: weather-query-test-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for weather-query-test-0.0.1.tar.gz
Algorithm Hash digest
SHA256 79a231c6c6d6c3b569ff6690643a6bc371894ca312bde8e20df1c511a5e8f23d
MD5 bac4c706cd71309af285272212c965d6
BLAKE2b-256 6c6392dc41eaae8c4f3486debc4311824237dbc3767748a8c846bd0c768c1506

See more details on using hashes here.

File details

Details for the file weather_query_test-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for weather_query_test-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f9925d5b6684972946b87884f3ad4c53f8aed64aebeb9e1c640d1cb221fdce5
MD5 2b82b9fb45509537e2fae9b566b94dd0
BLAKE2b-256 46cbb0b9e484842f23607f9674d6edeed8c71e99f22b082640d641d81f5578a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page