Saravanan666/pypi-org huggingface dataset:
Package: openweather
A basic OpenWeatherMap.org API client.News on experimental caching:The version here in the repository is currently ahead of the latest
version distributed on PyPy (0.9). It features Caching.If the cache isn’t explicitly deactivated, the function
“get_historic_weather()” stores data fetched from the API in an SQLite
database. On subsequent requests, data is fetched directly from the
database, if available.In order to deactivate the cache, useow=openweather.OpenWeather(cache=False)and in order to explicitly set a path for the cache DB file, useow=openweather.OpenWeather(cache="path/to/cache.db")InstallTo install the latest release:pip install openweatherFor the latest version from the repository, use:pip install git+https://github.com/marians/openweather.gitPython module exampleimportopenweatherfromdatetimeimportdatetime# create clientow=openweather.OpenWeather()# find weather stations near mestations=ow.find_stations_near(7.0,# longitude50.0,# latitude100# kilometer radius)# iterate resultsforstationinstations:printstation# get current weather at Cologne/Bonn airport# (station id = 4885)printow.get_weather(4885)# historic weatherstart_date=datetime(2013,09,10)end_date=datetime(2013,09,15)# default: hourly intervalprintow.get_historic_weather(4885,start_date,end_date)# daily aggregatesprintow.get_historic_weather(4885,start_date,end_date,"day")Command line client examplePrint current weather at station ID 4885:$openweather-s4885Print historic weather for 2013-10-01 at station ID 4885:$openweather-s4885-d20131001For valid formats of the-dor--dateparameter, seedaterangestr.Print historic data in CSV format$pythonopenweather.py-s4885-d20131022--csvThis is particularly usefull if you want to store that data to a file…$openweather-s4885-d20131022--csv>weather.csv… or want to manipulate and display it (usingcsvkit):$openweather-s4885-d20131027--csv|csvcut-c9,26,30,35,43|csvlook|-------------+-------------+------------+------------+---------------||dt|main_temp_v|pressure_v|wind_deg_v|wind_speed_v||-------------+-------------+------------+------------+---------------||1382824800|287.15|1005||4.1||1382835600|290.4|1008.25|170|5.93||1382839200|289.15|1007.5|175|5.1|...|1382904000|287.15|1007|210|5.9||1382907600|287.15|1007|200|6.2||1382911200|287.15|1006|177|5.1||||||||-------------+-------------+------------+------------+---------------|Like openweather?Feel free totip me!
Package: openweatherclass
A Python implementation of the Open Weather APITo use ➡️install fromPyPi.OpenWeather HomepagepipinstallopenweatherclassGet anAPIKeyInitiate the classimportopenweatherclassasowcweather=owc.OpenWeatherClass(api_key=API_KEY,zipcode='02188',units='imperial')print(weather.geo_data['name'])print(weather.weather_data['current']['temp'])
Package: openweathercli
Weather CLIThis is a small weather CLI I made in python using the OpenWeatherMap APIExamplesThis also works with separate states (with the--stateargument), but I couldn't think of any examples to use this withInstallationsudo pip install openweathercliRemovalsudo pip uninstall openweathercliOpenWeatherMap API keyGo tohttps://openweathermap.org/and pressThen, once you have signed back in (or created an account), you will see an interface such as this oneAlong the top, press API KeysAnd generate a new key like this (unless you want to use an existing API key)Then a new key will be generated and there will be a box that looks somewhat like thisCopy the text within the box, and then run the script. When you run it for the first time, it will prompt you like this:
Package: open-weather-generated-sdk
Getting Started with OpenWeatherMap APIIntroductionSample OpenWeather API.API Documentation:https://openweathermap.org/apiInstall the PackageThe package is compatible with Python versions3 >=3.7, <= 3.11.
Install the package from PyPi using the following pip command:pipinstallopen-weather-generated-sdk==2.5.2You can also view the package at:https://pypi.python.org/pypi/open-weather-generated-sdk/2.5.2Test the SDKYou can test the generated SDK and the server with test cases.unittestis used as the testing framework andpytestis used as the test runner. You can run the tests as follows:Navigate to the root directory of the SDK and run the following commandspip install -r test-requirements.txt
pytestInitialize the API ClientNote:Documentation for the client can be foundhere.The following parameters are configurable for the API Client:ParameterTypeDescriptionhttp_client_instanceHttpClientThe Http Client passed from the sdk user for making requestsoverride_http_client_configurationboolThe value which determines to override properties of the passed Http Client from the sdk userhttp_call_backHttpCallBackThe callback value that is invoked before and after an HTTP call is made to an endpointtimeoutfloatThe value to use for connection timeout.Default: 60max_retriesintThe number of times to retry an endpoint call if it fails.Default: 0backoff_factorfloatA backoff factor to apply between attempts after the second try.Default: 2retry_statusesArray of intThe http statuses on which retry is to be done.Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]retry_methodsArray of stringThe http methods on which retry is to be done.Default: ['GET', 'PUT']appidstrAPI key to authorize requests. If you don't have an OpenWeatherMap API key, use0e42a4c3dff34f7e42dbfcd804a5c917The API client can be initialized as follows:fromopenweathermapapi.openweathermapapi_clientimportOpenweathermapapiClientfromopenweathermapapi.configurationimportEnvironmentclient=OpenweathermapapiClient(appid='appid',environment=Environment.PRODUCTION)AuthorizationThis API usesCustom Query Parameter.List of APIsCurrent Weather DataClasses DocumentationUtility ClassesHttpResponseHttpRequest
Package: openweathermap-cli
A command line application for displaying weather details, written in Python.Getting StartedPrerequisitesPythonInstallingOpenweathermap-cli is onPyPiso it can be installed with pip.$pipinstallopenweathermap-cliTo upgrade use the -U flag.$pipinstall-Uopenweathermap-cliAdding your API keyTo begin you will need to add your API key. If you do not have an API key you can get one free fromOpen Weather Map.$weatherapiYOUR00API00KEY00GOES00HEREUsing openweathermap-cliUsage:weatherweatherweekweather-h|--helpweather--versionGet today’s weather forecast$weatherGet the week’s weather forecast$weatherweekExampleGet today’s weather details$weather+-----------------------+------------+|CityofWestminster|||-----------------------+------------||Temperature|10.45||TempMax|12.0||TempMin|9.0||Summary|Rain||Detail|lightrain||Sunrise|07:05:26||Sunset|17:23:52|+-----------------------+------------+Built Withskele-cliOpen Weather MapAuthorsAziez Ahmed ChawdharyLicenseThis project is licensed under the MIT License
Package: openweathermap_requests
OpenWeatherMap RequestsPythonpackage to fetch data fromOpenWeatherMap.orgusingRequestsandRequests-cacheand getPandas DataFramewith weather history.Command Line Interface UsageCurrent weatherGet current weather data$ python openweathermap_requests.py --lon 0.34189 --lat 46.5798114Historical weather dataFetch historical weather data from nearest weather station of
coordinates (lon=0.34189, lat=46.5798114) from 2014/01/01 to 2014/12/01
using:$ python openweathermap_requests.py --lon 0.34189 --lat 46.5798114 --range 20140101:20141201Library Usageimport datetime
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
from openweathermap_requests import OpenWeatherMapRequests

ow = OpenWeatherMapRequests(api_key='', cache_name='cache-openweathermap', expire_after=5*60)

(lon, lat) = (0.34189, 46.5798114) # Poitiers

data = ow.get_weather(lon=lon, lat=lat)  # display current weather data
print(data)

stations = ow.find_stations_near(lon=lon, lat=lat, cnt=10) # get 10 nearest stations from coordinates (lon, lat)

station_id = stations.iloc[0]['station.id'] # get station_id of nearest station

start_date = datetime.datetime(2014, 1, 1)
end_date = datetime.datetime(2014, 6, 1)

data = ow.get_historic_weather(station_id, start_date, end_date) # get historic weather from start date to end date
print(data)InstallFrom Python package index$ pip install openweathermap_requestsFrom sourceGet latest version using Git$ git clone https://github.com/scls19fr/openweathermap_requests.git
$ cd openweathermap_requests
$ python setup.py installLinksDocumentation can be found atRead The
Docs;Source code and issue tracking can be found atGitHub.Feel free totip me!
Package: openweathermap-simplified
Basic Openweathermap API wrapperWhyThis is an extremely simple wrapper around the Openweathermap OneCall API. It currently only supports forecasts. As it
is designed to be simple to use at the expense of features, the data is flattened from the nested structure to a single
dictionary for each forecast. In the process some data points are dropped.Users that are interested in the complete set of data points are encouraged to open an issue or submit a pull request.SetupObtain an Openweathermap API key atopenweathermap.orgSave the api key in a file '.api.txt' or the environment variable 'OPENWEATHERMAP_API_KEY'Usagefromopenweathermapimportget_daily_forecast,APIErrortry:forecast=get_daily_forecast(49.24966,-123.11934)# Vancouver, BC, CanadaexceptAPIErrorase:# Deal with missing/incorrect API key or failed requestsprint(e)Example return value for one day:{"dt":"2021-10-29T13:00:00","sunrise":"2021-10-29T08:56:00","sunset":"2021-10-29T18:56:09","clouds":28,"snow":None,"rain":None,"pop":0.26,"wind_speed":5.32,"wind_deg":283,"wind_gust":7.76,"humidity":72,"temp_day":282.15,"temp_morn":281.22,"temp_eve":280.99}
Package: open-weather-one-call-sdk
Getting Started with Open Weather One Call APIIntroductionGet essential weather data, short-term and long-term forecasts and aggregated weather data is easy with our OpenWeather One Call APIInstall the PackageThe package is compatible with Python versions3 >=3.7, <= 3.11.
Install the package from PyPi using the following pip command:pipinstallopen-weather-one-call-sdk==1.0.1You can also view the package at:https://pypi.python.org/pypi/open-weather-one-call-sdk/1.0.1Test the SDKYou can test the generated SDK and the server with test cases.unittestis used as the testing framework andpytestis used as the test runner. You can run the tests as follows:Navigate to the root directory of the SDK and run the following commandspip install -r test-requirements.txt
pytestInitialize the API ClientNote:Documentation for the client can be foundhere.The following parameters are configurable for the API Client:ParameterTypeDescriptionhttp_client_instanceHttpClientThe Http Client passed from the sdk user for making requestsoverride_http_client_configurationboolThe value which determines to override properties of the passed Http Client from the sdk userhttp_call_backHttpCallBackThe callback value that is invoked before and after an HTTP call is made to an endpointtimeoutfloatThe value to use for connection timeout.Default: 60max_retriesintThe number of times to retry an endpoint call if it fails.Default: 0backoff_factorfloatA backoff factor to apply between attempts after the second try.Default: 2retry_statusesArray of intThe http statuses on which retry is to be done.Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]retry_methodsArray of stringThe http methods on which retry is to be done.Default: ['GET', 'PUT']appidstrAPI key to authorize requests. If you don't have an OpenWeatherMap API key, use0e42a4c3dff34f7e42dbfcd804a5c917The API client can be initialized as follows:fromopenweatheronecallapi.openweatheronecallapi_clientimportOpenweatheronecallapiClientfromopenweatheronecallapi.configurationimportEnvironmentclient=OpenweatheronecallapiClient(appid='appid',environment=Environment.PRODUCTION)AuthorizationThis API usesCustom Query Parameter.List of APIsCurrentClasses DocumentationUtility ClassesHttpResponseHttpRequest
Package: openweather-pws
Simple python wrapper around Open Weather PWS APIRequirementsYou need API key to use it.
You can get it for free:https://home.openweathermap.org/api_keysUsageImport Station class, which contains all api methods:from openweather_pws import StationStationRegister new station:pws = Station(api_key='YOUR_API_KEY')
station_id = pws.register(external_id='YOUR_STATION_EXTERNAL_ID', 
                          name='YOUR STATION LONG NAME', 
                          latitude='44.419181',
                          longitude='38.205109', 
                          altitude='70') # altitude in meters
# If you plan to use pws class further, please note that 
# station_id will be stored as default station_id of class.
# Note: always use different external_id for each station!Get info about the station:pws = Station(api_key=api_key)
pws.info(station_id='YOUR_STATION_ID')Or, whenstation_idis set:pws = Station(api_key=api_key, station_id='YOUR_STATION_ID')
# if you iniatilize Station class with station_id param, 
# it will be used as default in all API call, if another is not specifiedYou can set/changestation_idany time you want:pws.set_station_id(station_id)Update station info:pws.update(station_id, external_id, name, latitude, longitude, altitude)Delete station:pws.delete(station_id)Get all stations infopws.all_stations() # will return all stations registered by user in listMeasurementsMeasurements can be accessed via Station class:pws.measurements.%method%or directly, if needed:from openweather_pws import Measurements

meas = Measurements(api_key='YOUR_API_KEY', station_id='YOUR_STATION_ID')  # station_is optionalAlso, you can set/changestation_idany time you want:meas.set_station_id(station_id)To obtain list of measurements from station:measurements = pws.meas.get(station_id, meas_type, limit, time_from, time_to)
# all params are optional
# by default will be used default station_id, hourly data (24 measurements)
# refer to: https://openweathermap.org/stations#get_measurementsGet only one measurement:measurement = pws.meas.get_one(station_id, meas_type, time_from, time_to)
# all params are optional
# by default will be used default station_id and hourly data, 1 measurementSend data of one measurement to PWS:pws.meas.set(dt, station_id, temperature, wind_speed, wind_gust, wind_deg,
        pressure, humidity, rain_1h, rain_6h, rain_24h, snow_1h, snow_6h,
        snow_24h, dew_point, humidex, heat_index, visibility_distance,
        visibility_prefix, clouds, weather)
# all params are optional
# by default will be used default station_id, dt is current time in unixtime format
# refer to: https://openweathermap.org/stations#measurementSend bulk data of PWS you'll need to prepare list with dicts and send it via:pws.meas.set_bulk(payload)Terms of serviceRefer tohttps://openweathermap.org/
Package: openweather_report
OpenWeather ReportGet weather using OpenWeather API and save to a database.QuickstartTo install, you can usepipx:$ pipx install openweather_reportIf usingpipI would suggest installing into a virtual environment.Notethatlibpqis required forpsycopg2.
Below is how to install using a Debian based distro like Ubuntu:$ sudo apt install install libpq-dev libpq5Then you can installopenweather_report.
Then to get help, do:$ openweather_report --help
Usage: openweather_report [OPTIONS] {one_call}
                          LATITUDE LONGITUDE API_KEY

  Take user inputs and save to either file or database.

Options:
  --weather_date [%Y-%m-%d %H:%M]
                                  Put in the date to get the weather for a
                                  particular day.
  --save [json|postgresql|sqlite]
  --save_path TEXT
  --db_string TEXT                Connection string to save to database.
  --version                       Show the version and exit.
  --help                          Show this message and exit.To save data to a json file:$ openweather_report one_call 30.00 -30.00 your-api-key --save json --save_path
my_city.jsonSetting up Database StructureCurrently PostgreSQL and Sqlite are supported.
The table structure will need to be generated before attempting to save any
data.PostgreSQLBelow is the structure forraw_json_data:create schema if not exists weather;

create table if not exists weather.raw_json_data (
(
     id bigserial not null
    ,entry_date timestamp with time zone not null
    ,api_call text not null
    ,raw_data jsonb null
    ,software_version null
	,primary key (id)
);SQLiteThe structure is similar to PostgreSQL but does not have a schema:create table if not exists raw_json_data
(
     id integer primary key
    ,entry_date text not null
    ,api_call text not null
    ,raw_data text null
    ,software_version text null
);OpenWeather APIGo tohttps://openweathermap.org/apithough this program currently only
supports the One Call API.
The program will eventually support other APIs.
Package: openwebpos
OpenWebPOSOpenWebPOS is a web-based point of sale system written in python using the Flask framework.InstallationRun the following to install:$pipinstallopenwebposUsagefromopenwebposimportcreate_appapplication=create_app()if__name__=="__main__":application.run()DevelopingTo install openwebpos, along with the tools you need to develop and run tests, run the following in your virtualenv:$pipinstall-e.[dev]
Package: openweedlocator-tools
Official OpenWeedLocator ToolkitSimplifying the integration of weed detection into your platform.OverviewThe OpenWeedLocator (OWL) is an open-source weed detection device for low-cost,
DIY site-specific weed management. Here, we're making the software that supports
the OWL more accesible with an easy-to-use API, so you can integrate weed detection
into your own devices and services more easily by simply callingGreenonBrown.find().Currently, it supports green-on-brown detection on all platforms, and green-on-green
on desktops through the Ultralytics package.In the future, we will support plant counting, GPS integration and green-on-green
on edge devices (Jetson Nano, Raspberry Pi)InstallationTo install the latest version ofopenweedlocator-toolssimply run:Desktoppip install openweedlocator-tools[desktop]Quick Startfrom owl.viz import webcam, images_and_video

# Run using your webcam
webcam(algorithm='gog', model_path='models/yolov8n.pt) # press escape to exit, add your own model path as required or clone this repository

# or 
images_and_video(media_path='path/to/your/media_filesStreamlit AppTry it for yourself now with the online, Streamlit app!
Package: openwfs
This repository holds Python code for conducting and simulating a wide range
of wavefront shaping experiments in a Python environment.OpenWFS is a modular platform for:Controlling spatial light modulators using OpenGL acceleration.Controlling a laser-scanning microscope using a NI Data Acquisition Card.Conducting wavefront shaping experiments using a variety of algorithms.Simulating wavefront shaping experiments using a variety of algorithms.Highlighted features:automatic synchronization of the SLM and camera, and a pipelined measurement mode that avoids the delay normally caused by the latency of the video card and SLM.a modular design that allows for easy addition of new algorithms and devices.extensive framework for testing and simulating wavefront shaping algorithms, including the effect of noise, and user-defined aberrations.Note: this code is designed so that it can be used in conjunction with MicroManager,
a free and open-source microscopy, without any modification.
To use this code in MicroManager, you need the PyDevice plugin, which can be found here:https://www.github.com/IvoVellekoop/pydeviceInstallation instructions>>> pip install openwfsTo run the examples, create a local directory and clone the repository from github using>>> git clone http://www.github.com/IvoVellekoop/openwfs.gitThe examples are located in the openwfs/examples folder.
Package: openwholeslide
openwholeslideWrapper around tifffile library to have the same API as OpenSlide.Installation$pipinstallopenwholeslideUsageSimilarly to OpenSlide, the openwholeslide package allows to load a WSI as follows:import openwholeslide as ows

wsi = ows.WholeSlide(path="/path/to/wsi")Regions can be extracted from this WholeSlide object. For example, a lower resolution of the full scale WSI can be extracted as follows:region = wsi.read_full(magnification=1.0)This actually performs a lazy loading which does not load the data information. In order to get access to the region's pixels (as an numpy.ndarray), the following property should be called:img = region.as_ndarrayContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licenseopenwholeslidewas created by Arthur Elskens and Adrien Foucart. It is licensed under the terms of the MIT license.
Package: openwid
openwid(OpenWeather in Dash) is a Python package for creating daily weather forecast components in Plotly Dash framework. You can easily add a fully responsive weather forecast card to your Dash applications. Before starting, you need to get a unique API key fromOpenWeatherwebsite.Installopenwid can be installed usingpip install openwidGetting StartedHere is a very simple example that creates 7 day weather forecast card for MontrÃ©al:import dash
import dash_bootstrap_components as dbc
import dash_html_components as html

from openwid import Openwid   # Importing openwid

openwid_mon = Openwid(
    api_key="YOUR_API_KEY",   # <-- Edit Here
    latitude="45.501690",
    longitude="-73.567253"
)

app = dash.Dash(
    __name__, meta_tags=[{"name": "viewport", "content": "width=device-width"}],
    external_stylesheets = [dbc.themes.PULSE]
)

app.layout = html.Div(
    [
        html.Div(
            [
                dbc.Row(
                    dbc.Col(
                        openwid_mon.get_card(city_name="MontrÃ©al", days=7),
                        lg=6,
                        md=6,
                        sm=12
                    ),
                )
            ], style={"margin": "2rem"}
        )
    ]
)

if __name__ == '__main__':
    app.run_server(debug=True)Constructor / reinitialiseOPENWID()You can use Openwid class as an instance.Openwid(
    api_key="YOU_API_KEY",
    latitude="LATITUDE",
    longitude="LONGITUDE"
)TheOpenwid()constructor takes the following arguments:api_keythe unique OpenWeather API keylatitudelatitude of the locationlongitudelongitude of the locationComponent FunctionsYou can use this function to add a card component to your layout.GET_CARD()get_card(
    city_name="CITY_NAME",
    days=4,
    bg_color="teal"
)Theget_cardfunction takes the following arguments:city_namethe city name in card headerdayshow many days weather forecast will be shown, default=4bg_colorbackground color of the weather card, default=#00202fScreenshots
Package: openwillis
OpenWillis is a python library for digital health measurement.It was developed byBrooklyn Healthto establish standardized methods in digital phenotyping and make them open and accessible to the scientific community.It is freely available for non-commercial use (see license).Release notesGetting startedList of functionsResearch guidelinesPlease report any issues using theIssuestab.If you’d like to contribute to OpenWillis or have general questions, pleaseget in touch.