Skip to content

(DEMO) Just a weather rest API built with trae agent

Notifications You must be signed in to change notification settings

marcosvlima/trae-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trae-test

(DEMO) Just a weather rest API built with trae agent

For detailed technical documentation and architecture, please see DESIGN.md.

Prerequisites

  • Python 3.7 or higher
  • WeatherAPI.com API key (get it from WeatherAPI.com)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/trae-test.git
cd trae-test
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
    • Create a .env file in the project root
    • Add your WeatherAPI.com API key as follows:
      WEATHERAPI_KEY=your_api_key_here
      

Running the Application

Start the server with:

uvicorn main:app --reload

The API will be available at http://localhost:8000

API Usage

Get Weather Information

curl http://localhost:8000/weather/{city}

Replace {city} with the name of the city you want to get weather information for.

Example response:

{
    "city": "London",
    "temperature": 15.6,
    "humidity": 75,
    "description": "Partly cloudy",
    "feels_like": 14.8
}

About

(DEMO) Just a weather rest API built with trae agent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages