Saravanan666/pypi-org huggingface dataset:
Package: trado
tradoTODO: FIX ITDumb and dirty docker-compose files generator for traefik exposingAll services described in one services.toml file and converted to more or less docker-compose compatible blocks.
Top-level keys is services name, images, environment, volumes, ports is mirrored to docker-compose.Services exposure to traefikThe most complicated part ispublickey, which is used to generate traefik labels.publicsignature is:public:<host>[/<path>][@port]hostdirectly used as hostname in traefik labels. TLS with letsencrypt is enabled by default.pathis optional and used as path in traefik. New service will be exposed withhttps://host/pathbut after proxing the path will be truncated.
Be careful,hostwithout path must be configured in a diffrenent service at least once.port: it's a hint for traefik to find a proper port for proxyingNotice, that defaultnetworksfor all services withpublicdefined istraefik.Optionsimage: docker image nameenvs: list of environment variablesdoppler: extract list of variables fromdopplervolumes: list of volumesports: list of portsrestart: restart policy, default isalwaysnetworks: list of networks. Default istraefikfor every service withpublicdefined but can be extended.labels: list of labels. For everypublicservice it's filled with traefik-specific labels.watchtower: add label to enable and disable autoupdate of service withwatchtowerExample[gitea]image="gitea/gitea:latest"public="git.rubedo.cloud @ 3000"doppler=truewathctower=truevolumes=["./data:/data"]ports=["3000:3000","2222:22"][gitea.envs]USER_UID=1000USER_GID=1000TEST="test"[asdf]image="containous/whoami"public="asdf.rubedo.cloud"restart="unless-stopped"[whoami2]image="containous/whoami"public="git.rubedo.cloud /test"restart="unless-stopped"labels="testlabel=true"[blah]image="containous/whoami"# not exposed to traefik at all
Package: tradologics
This is the initial version of Tradologics’ Python SDK.At the moment, it only supports a wrapper for the awesomerequestslibrary that will automatically:prepend the full endpoint url to your callsattach your token to the request headersadddatetimeto your order when in backtesting modeInstall using PyPi$pip3install-UtradologicsUsing the library:In yourrequirements.txt:tradologicsIn your code:# import Tradologics' requestsimporttradologics.requestsasrequests# set your token (once)requests.set_token("MY TOKEN")# from this point - use is just like you would have used `reqeuests`:requests.post("/orders",json={...})Running your own server:Assuming that strategy.py (your strategy file) is located in the same directory as your server.py file (your Tradehook’s handler file), and that strategy.py has a main function called strategy:# server.pyfromtradologicsimportserver#-------------------------------# ↓ this should be a file with your strategy codefrom.importstrategy#-------------------------------server.start(strategy,endpoint="/my-strategy",host="0.0.0.0",port=5000,debug=False)
Package: tradovate
InformationThis package to connect TradOvate APIInstallation# Create an isolated Python virtual environmentpip3installvirtualenv
virtualenv./virtualenv--python=$(whichpython3)# Activate the virtualenv# IMPORTANT: it needs to be activated every time before you run.virtualenv/bin/activate# Install Python requirementspipinstall-rrequirements.txt# Install cointrol-*pipinstall-e.# Set param enviroment env.envTO_ENV=DEMOTO_NAME=YourcredentialshereTO_PASSWORD=YourcredentialshereTO_APPID="Sample App"TO_CID=0TO_SEC=YourAPIsecrethere# run testpython-mtest
Package: trad-robo-python
PyrobotTable of ContentsOverviewSetupUsageOverviewCurrent Version:1.0.6A trading robot written in Python utilizing theLemon Markets APIdesigned to mimic a few common scenarios:Providing an interface for the user's trading account. ThePyRobotobject will    initialize a new instance of the robot and provide general information regarding the user's account. It will also serve as main object connecting all other objects to provide  easy access to other functionalities.Maintaining a portfolio of multiple instruments. ThePortfolioobject will be able
to calculate common portfolio risk metrics, display order information, and provide both historical and real-time prices for instruments.Define an order that can be used to trade a financial instrument. With theTradeobject, you can place, cancel and retrieve orders.Define and calculate indicators using both historical and real-time prices. TheIndicatorobject
will help you easily define the input of your indicators, calculate them, and then update their values
as new prices come.Access new information daily. TheMarketData,TradingPositionsandTradingAccountobjects will interact with theLemon Markets APIto ensure the trader is equipped with up-to-date information regarding the market and their portfolio.SetupSetup - PyPi Install:The project can be found at PyPI, if you'd like to view the project please use thislink. Toinstallthe library,
run the following command from the terminal.pipinstalltrad-robo-pythonUsageTo run the robot, you will need to provide a few pieces of information from your Lemon Markets Paper Trading Account
The following items are need for authentication:Market Data API Key: This will be provided when you register an account with the Lemon Markets website.  An example of a Market Data API key could look like the followingeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJh.Paper Trading API Key: This will be provided when you register an account with the Lemon Markets website.  An example of a Paper Trading API key could look like the followingeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..Once you've identified those pieces of info, you can run the robot. Here is a simple example that will create a new instance
of it:frompyrobot.robotimportPyRobot# Initialize the robottrading_robot=PyRobot(market_api_key='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJh',paper-trading_api_key='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.')For more detailed examples, go to therun_robot.pyfile to see an example of how to use the library along with all the different objects inside.
Package: tradssat
traDSSATTraDSSAT is a library to easily read and write DSSAT input and output files.StatusInstallationpoetry add tradssatorpip install tradssatFull docsRead the full thinghere.CitationIf you use traDSSAT, please consider citing this repository until we write a real publication about traDSSAT.Quick examplesParse and edit any DSSAT file directly:fromtradssatimportSoilFile,WTHFile,ExpFile,set_dssat_dirfromtradssatimportGeneticMgr,CULFile,ECOFile# Read, edit and write soil filessoil=SoilFile('path/to/my/file.SOL')# Read and write weather files as wellwth=WTHFile('path/to/my/WTHR0001.WTH')# ...and experiment files!exp=ExpFile('path/to/my/experiment.EXP')# Access genetic coefficients by cultivar file or ecotype filecul=CULFile('path/to/my/MZIXM.CUL')eco=ECOFile('path/to/my/MZIXM.ECO')cul.get_value('P1')# returns array of all varieties' P1eco.get_value('TOPT')# returns array of all ecotypes' TOPT# ...or automagically!set_dssat_dir('C:/DSSAT47')gen=GeneticMgr(crop='MZIXM',cult='PC0001')gen.get_value('P1')# Returns P1 for MZIXM cultivar PC0001gen.get_value('TOPT')# Returns ecotype variable TOPT for cultivar PC0001Read, edit and write experiments, with automatic access to referenced
external soil, genetic and weather files:fromtradssatimportDSSATRunrun=DSSATRun('path/to/my/experiment.EXP')run.get_trt_val('INGENO',trt=1)# Get cultivar for treatment 1run.set_trt_factor_level(trt=1,factor='CULTIVARS',level=2)# Change level of treatment factorrun.set_factor_level_val('INGENO','IB0067',level=1)# Change value of a factor level (in this case cultivar type)Access output from a run:fromtradssatimportDSSATResultsout=DSSATResults('path/to/my/output/dir')out.get_value('FWAD',trt=1)# Get results at specific time (day of year, days after planting or days after start)out.get_value('FWAD',trt=1,t=13,at='DAS')# Get result at 13 days after startout.get_value('FWAD',trt=1,t=13,at='DAP')# Get result at 13 days after plantingout.get_value('FWAD',trt=1,t='1989 123',at='DOY')# Get result at 123th day of year 1989ContributingDon't forget to add your name to the authors list in thedocs/source/acknow.rstfile!LicensingMIT License
Package: traducteur
TraducteurTraducteur is a database model manager and task sheduler which aims to make developing basic app with database models and tasks faster and easier.Requirementspython ^3.8pydantic ^1.10.4OptionalFor mongo db:pymongo ^4.3.3For task queueing or redis model management:redis-py ^4.4.2InstallationBase install:pip install traducteurInstall with extras:pip install "traducteur[tasks]"This example will install traducteur and all the packages you need to use traducteur tasks.optional extras:sqlnosqlcachingmongotasksallThe ideaContext managerswithBaseContext(connection_string)asdb:returndb.get()Model managersModel managers use context managersmanager=BaseModelManager(connection_string)result=manager.get(example_id)result=manager.delete(example_id)ModelsModels use model managersclassUser(BaseDatabaseModel):username:strfname:strlname:stremail:struser=User(username='johndoe',fname='John',lname='Doe',email='john.doe@mail.com')'''Easy create, save, update and delete'''user=User(username='johndoe',fname='John',lname='Doe',email='john.doe@mail.com')# saving the modeluser=user.save()# saving also updates the modeluser.lname='Joe'user=user.save()# getting a model by its ID from the databaseuser=User.get(user_id)# deleting a model from the databasedeleted_user=user.delete()TasksTasks use models# in a programdefmy_func(a:int,b:int)->int:returna+btask=BaseTask(action=my_func)task.queue(a=8,b=3)################ in a worker #task.digest()################# some time laterresult=task.result()Chain tasksTasks can be chained together for larger workloadsdefdouble(number:int):return{'number':number*2}# make tasksone=BaseTask(action=double)two=BaseTask(action=double)three=BaseTask(action=double)# chain taskstwo.set_parent(one)three.set_parent(two)# queue parent taskone.queue(number=2)################ in a worker #one.digest()################# some time laterresult=one.result()assertresult==8,"Should be 8 as 2*2*2 == 8"Available functionalityContext managersMongoContextSQLite3ContextModel managersMongoModelManagerSQLModelManagerSQLQueryBuilderQuery filtersDatetime filterNumber filterString filterModelsBaseMongoModelBaseRedisModelBaseSQLModelTasksRedisTaskTodo / in progressTasksChain tasksRedisMongoSQLTask workerSingle ProcessMulti ProcessRabbitMQ taskTestsTests can be found in thetestfolder. They use pythonsunittestand can be run with:python3 -m unittest path/to/test.pyTests get automatically run after each push.Available testsMongo modelMongo sortingRedis taskBasic functionsChaining
Package: traductorPy
TraductorPyEsta librería te ayudara a traducir el texto que necesites utilizar.DemoSi desea ver más sobre el proyecto puede visitareste
Link.InstalaciónPara instalar y ejecutar este proyecto, simplemente escriba y ejecutepipinstalltraductorPy### Dependencias- Python 3 - selenium ### PreviewTraductorPY ExampleUsofromtraductorPyimportTraductortranslate='Hola mundo !'lan_source='ES'lan_to='PT'print(Traductor.translater(translate,lan_source,lan_to))Olá mundo!print(Traductor.translater(translate))Hello world !Propiedades de translaterPropiedadTipoDescripciónUsoValor por Defectolan_sourcestringIdiomalan_source =“DE”ENlan_tostringIdiomalan_to =“DE”EStranslatestringTexto a traducirtranslate =“Hola MundO”’’Idiomas DisponiblesIdiomaValorAlemánDEBúlgaroBGChecoCSChinoZHDanésDAEslovacoSKEslovenoSLEspañolESEstonioETFinésFIFrancésFRGriegoELHúngaroHUInglésENItalianoITJaponésJALetónLVlituanoLTneerlandésNLpolacoPLportuguésPTrumanoROrusoRUsuecoSV
Package: traduisons
![Traduisons Logo](https://traduisons.googlecode.com/files/traduisons.png)Traduisons! (French for “Let’s Translate!”) is a front-end for various online
translation services, allowing translation of words and sentences without opening
the browser. It is written in python and optionally uses a gtk-based gui.Traduisons! is focused on being as streamlined and fast as possible. It is
designed to be a quick, reference tool, not a large-scale document
translator.Traduisons! itself is not a translator. It works by sending a query string
to a web-based translation service and copying the result to the
clipboard and screen.All operations are performed with keyboard shortcuts or specific input
characters such as ‘/’ and ‘.’.Internet access is required to use Traduisons!.INSTALLATIONAs of version 0.4.1, traduisons is distributed as a standard python package. To
install it, unzip and runpython setup.py install [–user]or install directly from pypipip install [–user] traduisonsScreenshots![](http://traduisons.googlecode.com/files/screenshot-05-linux.png)
![](http://traduisons.googlecode.com/files/screenshot-02-linux.png)
![](http://traduisons.googlecode.com/files/screenshot-03-windows.png)
![](http://traduisons.googlecode.com/files/screenshot-04-windows.png)
![](http://traduisons.googlecode.com/files/screenshot-01-linux.png)
Package: traduki
traduki: SQLAlchemy internationalisationThetradukipackage provides internationalisation helper classes for SQLAlchemy-based projects.Installationpip install tradukiUsagetraduki usage example:fromsqlalchemy.ext.declarativeimportdeclarative_baseBase=declarative_base()importtradukidefget_current_language():"""Current language callback for our project."""returnrequest.localedefget_language_chain():"""Language chain (fallback rule) callback for our project."""return{'*':request.locale}i18n_attributes=traduki.initialize(Base,['en','ru'],get_current_language,get_language_chain)Session=sessionmaker(bind=engine)sess=Session()classMyModel(Base)title_id=i18n_attributes.i18n_column(nullable=False,unique=False)title=i18n_attributes.i18n_relation(title_id)"""Title."""my_object=MyModel()my_object.title={'en':'English title','pt':'Portugese title'}sess.add(my_object)sess.commit()assertsess.refresh(my_object).title.get_dict()=={'en':'English title','pt':'Portugese title'}ContactIf you have questions, bug reports, suggestions, etc. please create an issue on
theGitHub project page.LicenseThis software is licensed under theMIT licenseSeeLicense© 2018 Paylogic International.Changelog1.3.2Fix a bug where theget_ordered_languageswould mutate in place the list of configured languages.1.3.1Fix UnicodeDecodeError when installing this library on python 3 on some configurations.1.3.0Fix python 3 compatibilityDeclare support for python 2.7, 3.5, 3.6, 3.7, 3.81.2.0Do not use deprecated AttributeExtension, use Attribute Events instead.1.1.0Use an OR operator for LIKE_OPS to find matches in all language columns.1.0.1Fixget_text_from_dictraising an exception when no language can be detected.1.0.0Initial public release
Package: tradutor
package_nameDescription.
The package tradutor is used to:
- Translate short texts from English to Portuguese
- Translate short texts from Portuguese to EnglishDescrição:
O pacote tradutor é utilizado para:
- Traduzir um texto curto do Inglês para o Português
- Traduzir um texto curto do Português para o InglêsInstallationUse the package managerpipto install tradutorpipinstalltradutorUsagefromtradutorimporttradutor_pten,translate_enpttradutor_pten.pt_en('texto a ser traduzido')translate_enpt.en_pt('What do you want to translate into Portuguese?')AuthorPaulo Ricardo DinizLicenseMIT
Package: traefik-certificate-exporter
OverviewThis tool can be used to extract acme certificates (ex: lets encrupt) from traefik json files. The tool is design to watch for changes to a folder for any files that match a filespec (defaults to *,json however can be set to a specific file name) and when changes are detected it will process the file and extract any certificates that are in it to the specified output pathInstallationPython Script/ToolInstallation can be done via the python package installer tool pip$ pip install traefik-certificate-exporterUsageusage:traefik-certificate-exporter[-h][-cCONFIGFILE][-dDATAPATH][-w][-fsFILESPEC][-oOUTPUTPATH][--traefik-resolver-idTRAEFIKRESOLVERID][-f][-r][--dry-run][-id[INCLUDEDOMAINS[INCLUDEDOMAINS...]]|-xd[EXCLUDEDOMAINS[EXCLUDEDOMAINS...]]]Extracttraefikletsencryptcertificates.

optionalarguments:-h,--helpshowthishelpmessageandexit-cCONFIGFILE,--config-fileCONFIGFILEthepathtowatchforchanges(default:None)-dDATAPATH,--data-pathDATAPATHthepaththatcontainstheacmejsonfiles(default:./)-w,--watch-for-changesIfspecified,monitorandwatchforchangestoacmefiles-fsFILESPEC,--file-specFILESPECfilethatcontainsthetraefikcertificates(default:*.json)-oOUTPUTPATH,--output-directoryOUTPUTPATHThefoldertoexportsthecertificatesinto(default:./certs)--traefik-resolver-idTRAEFIKRESOLVERIDTraefikcertificate-resolver-id.-f,--flatIfspecified,allcertificatesintoasinglefolder-r,--restart_containerIfspecified,anycontainerthatarelabeledwith'com.github.ravensorb.traefik-certificate-exporter.domain-restart=<DOMAIN>'willberestartedifthedomainnameofageneratedcertificatesmatchesthevalueofthelable.Multipledomainscanbeseperatedby','--dry-runDon'twritefilesanddonotrestartdockercontainers.-id[INCLUDEDOMAINS[INCLUDEDOMAINS...]],--include-domains[INCLUDEDOMAINS[INCLUDEDOMAINS...]]Ifspecified,onlycertificatesthatmatchdomainsinthislistwillbeextracted-xd[EXCLUDEDOMAINS[EXCLUDEDOMAINS...]],--exclude-domains[EXCLUDEDOMAINS[EXCLUDEDOMAINS...]]Ifspecified.certificatesthatmatchdomainsinthislistwillbeignoredExamplesWatch the letsencrypt folder for any changes to files matching acme-*.json and export any certs managed by the resolver called "resolver-http"ScriptRun it once and exitetraefik-certificate-exporter\-d/mnt/traefik-data/letsencrypt\-o/mnt/certs\-fs"acme-*.json"\--traefik-resolver-id"resolver-http"Run it and watch for changes to the filestraefik-certificate-exporter\-d/mnt/traefik-data/letsencrypt\-o/mnt/certs\-fs"acme-*.json"\--traefik-resolver-id"resolver-http"\-wCreditsThis tool is HEAVLY influenced by the excellent work ofDanielHuismanandMarc Brückner
Package: traefik-validator
A simple command to validate traefik config files with traefik schema.Traefik static config schema is from:https://json.schemastore.org/traefik-v2.jsonTraefik dynamic config schema is from:https://json.schemastore.org/traefik-v2-file-provider.jsonInstallationInstall the package:pip3installtraefik-validatorUsageRun the command:validate_traefik -h

>>> usage: validate_traefik [-h] [-s STATIC_CONFIG] [-d DYNAMIC_CONFIG]

Validate traefik config file.

optional arguments:
-h, --help            show this help message and exit
-s STATIC_CONFIG, --static-config STATIC_CONFIG     The static file path
-d DYNAMIC_CONFIG, --dynamic-config DYNAMIC_CONFIG      The dynamic file pathFor validating static config file:validate_traefik -s <PATH_TO_YOUR_FILE>For validating dynamic config file:validate_traefik -d <PATH_TO_YOUR_FILE>Note that you can use both options at the same command.
Package: trafaret
TrafaretUltimate transformation library that supports validation, contexts andaiohttp.Trafaret is rigid and powerful lib to work with foreign data, configs etc.
It provides simple way to check anything, and convert it accordingly to your needs.It has shortcut syntax and ability to express anything that you can code:>>>fromtrafaret.constructorimportconstruct>>>validator=construct({'a':int,'b':[str]})>>>validator({'a':5,'b':['lorem','ipsum']}){'a':5,'b':['lorem','ipsum']}>>>validator({'a':5,'b':['gorky',9]})Traceback(mostrecentcalllast):File"<console>",line1,in<module>File"/Users/mkrivushin/w/trafaret/trafaret/__init__.py",line204,in__call__returnself.check(val)File"/Users/mkrivushin/w/trafaret/trafaret/__init__.py",line144,incheckreturnself._convert(self.check_and_return(value))File"/Users/mkrivushin/w/trafaret/trafaret/__init__.py",line1105,incheck_and_returnraiseDataError(error=errors,trafaret=self)trafaret.DataError:{'b':DataError({1:DataError(valueisnotastring)})}Read The Docs hosted documentationhttp://trafaret.readthedocs.org/en/latest/or look to thedocs/intro.rstfor start.Trafaret can even generate Trafarets instances to build transformators from json,
like in json schema implementationTrafaret SchemaNew2.0.2construct forintandfloatwill useToIntandToFloat2.0.0WithRepr– use it to return custom representation, like<Email>Strip a lot from dict, likekeys()Trafarets are not mutableDataError has newcodeattribute, self.failure hascodeargumentOnError hascodeargument tooNewDataError.to_structmethod that returns errors in more consistent wayString,AnyString,Bytes,FromBytes(encoding=utf-8)Int,ToInt,Float,ToFloatToDecimalIterablethat acts like aList, but works with any iterableNewDate,ToDateandDateTime,ToDateTimetrafaretsStrBooltrafaret renamed toToBoolVisitortrafaret was deletedTest coverage1.x.xconverters andconvert=Falseare deleted in favor ofAndand&Stringparameterregexdeleted in favor ofRegexpandRegexpRawusagenewOnErrorto customize error messagecontext=somethingargument for__call__andcheckTrafaret methods.
Supported byOr,And,Forwardetc.new customizable methodtransformlikechange_and_returnbut takescontext=argnewtrafaret_instance.async_checkmethod that works withawaitDocFor simple example what can be done:importdatetimeimporttrafaretastdate=t.Dict(year=t.Int,month=t.Int,day=t.Int)>>(lambdad:datetime.datetime(**d))assertdate.check({'year':2012,'month':1,'day':12})==datetime.datetime(2012,1,12)Work with regex:>>>c=t.RegexpRaw(r'^name=(\w+)$')>>(lambdam:m.group(1))>>>c.check('name=Jeff')'Jeff'Rename dict keys:>>>c=t.Dict({(t.Key('uNJ')>>'user_name'):t.String})>>>c.check({'uNJ':'Adam'}){'user_name':'Adam'}Arrowdate checking:importarrowdefcheck_datetime(str):try:returnarrow.get(str).naiveexceptarrow.parser.ParserError:returnt.DataError('value is not in proper date/time format')Yes, you can write trafarets that simple.Related projectsTrafaret ConfigTrafaret Validator
Package: trafaret-config
Status:StableDocumentation:http://trafaret-config.readthedocs.io/This is a wrapper that loads yaml and checks config usingtrafaretwhile
keeping track of actual lines of file where error has happened. Additionally,
it can pretty print the error.Basic Usage:importargparseimporttrafaretfromtrafaret_configimportcommandlineTRAFARET=trafaret.Dict({'x':trafaret.String()})defmain():ap=argparse.ArgumentParser()commandline.standard_argparse_options(ap,default_config='config.yaml')## define your command-line arguments here#options=ap.parse_args()config=commandline.config_from_options(options,TRAFARET)pprint.pprint(config)Example output when there is an error in config (from aexample.pywhich
has better trafaret than example above):bad.yaml:3: smtp.port: value can't be converted to int
  -> 'unknown'
bad.yaml:4: smtp.ssl_port: value can't be converted to int
  -> 'NaN'
bad.yaml:5: port: value can't be converted to int
  -> '???'Help looks like this:usage: example.py [-h] [-c CONFIG] [--print-config] [--print-config-vars] [-C]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Configuration file (default: 'config.yaml')
  --print-config        Print config as it is read after parsing and exit
  --print-config-vars   Print variables used in configuration file
  -C, --check-config    Check configuration and exitSince trafaret-config 2.0 environment variables in the config are replaced
by default, this means that config like this:url:http://${HOST}:$PORT/Will getHOSTandPORTvariables insert from the environment, and if
variable does not exist, you will get the following error:config.yaml:2: variable 'PORT' not found
  -> 'http://${HOST}:$PORT/'Low-level interface, without relying on argparse:importsysimporttrafaretfromtrafaret_configimportConfigError,read_and_validateTRAFARET=trafaret.Dict({'x':trafaret.String()})try:config=read_and_validate('config.yaml',TRAFARET)exceptConfigErrorase:e.output()sys.exit(1)Installationpip install trafaret-config==2.0.2LicenseLicensed under either ofApache License, Version 2.0,
(./LICENSE-APACHE orhttp://www.apache.org/licenses/LICENSE-2.0)MIT license (./LICENSE-MIT orhttp://opensource.org/licenses/MIT)
at your option.ContributionUnless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.