Skip to main content

날씨 정보 제공 패키지

목적

이 패키지는 사용자가 OpenWeatherMap API의 일기예보 정보를 간편하게 조회할 수 있도록 돕기 위해 개발되었습니다.

사용하기

이 패키지는 Python 3.11에서 동작을 확인했습니다.

  1. openweathermap api key 발급
  2. openai api key 발급
  3. 프로젝트 루트 혹은 특정 위치에 .env 파일 생성
OPENWEATHERMAP_API_KEY=""
OPENAI_API_KEY=""
  1. 패키지 설치
pip install ask_weather
  1. 실행
from ask_weather.agent import WeatherAgent
# WeatherAgent 인스턴스 생성
agent = WeatherAgent(
    env_path=".env api key file path", # (default. ".env")
    model="only support openai models", # (default. "gpt-4o-mini")
    temperature=0,
    verbose=False,
    max_iterations=10,
    max_execution_time=100000,
    handle_parsing_errors=False,
    return_intermediate_steps=False
)
# 위치와 날짜에 대한 질의
location = "Seoul"
date = "2024-10-15"
query = f"{date}의 {location} 날씨가 궁금해요."
result = agent.query(query)
print(result)

source에서 패키지 설치

# Poetry로 패키지 설치
poetry install
# poetry env use python3.11

테스트하기

poetry run pytest

package 만들기

  1. pypi 회원가입 후 api key 발급
  2. poetry config pypi-token.pypi api_key 실행
  3. poetry build로 whl 파일 생성
  4. poetry publish --build로 프로젝트 배포

TODO

[] 과거 시간의 기상 상황 검색 [] weather api dictionary 정보 다양하게 활용

reference

이 프로젝트는 위키독스 LangChain 가이드를 참고했습니다.

Metadata

Release files for ask-weather 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ask-weather 0.1.5
File Size Uploaded Provenance
ask_weather-0.1.5.tar.gz 9.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ask-weather 0.1.5
File Interpreter ABI Platform
ask_weather-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / ask_weather-0.1.5.tar.gz

Download URL ask_weather-0.1.5.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3f0cb7f3fd9bb0895789bce431faa07121ced2704e926440df871a77cf47fc2b
BLAKE2b-256 checksum
How to use checksums
3b84c44c88ad70dd8863109cd42fb96553f8a664bbde551ffdc7b1b933c71b35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Darwin/23.2.0

Release files / ask_weather-0.1.5-py3-none-any.whl

Download URL ask_weather-0.1.5-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ad22d861e9b30dc76b664352e6ebad52eb4119cc54df4198475efbcb93a8326
BLAKE2b-256 checksum
How to use checksums
4b72e5794cb4144831ae7a2749b95f87b0095b7ba119cbc40ac74908c2fdc75e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Darwin/23.2.0

Security for ask-weather 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page