Skip to main content

A python http client library inspired by Retrofit, Refit

Project description

Installation

pip install snakifit

Usage

from snakifit.http_client import *

@http_host(base_url="http://localhost:5049")
class MyHttpApiHost:
    
    @http_get('/WeatherForecast/{city}')
    def get_weather_by_city(self, city: str, days:int) -> dict:
        pass
    
    @http_get('/WeatherForecast/all')
    def get_all_weather_forecast(self, city: str, days:int) -> dict:
        pass
    
    @http_post('/WeatherForecast/{city}')
    def create_weather_forecast(self, city: str, days:int) -> dict:
        pass

api = MyHttpApiHost()
print(api.get_weather_by_city("shanghai", 3))

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

snakifit-0.0.1b0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

snakifit-0.0.1b0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file snakifit-0.0.1b0.tar.gz.

File metadata

  • Download URL: snakifit-0.0.1b0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for snakifit-0.0.1b0.tar.gz
Algorithm Hash digest
SHA256 6f0aa057d498f7d920c0fb3bcef2f32f2bf0c57d7b332fa99b186d49bce35728
MD5 e334e571b0d8055528c68ae8ad82c7f4
BLAKE2b-256 1433bcd42aa1f6e341ff78e7919b82926b1ebce25938be3462df2f527458cc95

See more details on using hashes here.

File details

Details for the file snakifit-0.0.1b0-py3-none-any.whl.

File metadata

  • Download URL: snakifit-0.0.1b0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for snakifit-0.0.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 a62801eff9005d5f2c4600e7eaec647719985d8001b09c3c838bd730dbfbb54d
MD5 7097c18315dfdea72ef45f624d58720f
BLAKE2b-256 7b81d8379555aae401adb818afc2a367eacdde7cfcb586d67034b80228bf48e8

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