Saravanan666/pypi-org huggingface dataset:
Package: logya
Logya READMELogya is a static site generator written in Python designed to be easy
to use and flexible.Quickstart# install logya and required packages
pip install logya

# create a barebone site
logya create mysite
cd mysite

# add content and then generate the site in the public directory
logya gen

# serve the site from public directory on http://localhost:8080
logya servePlease see thedocumentationfor more
information on how to use Logya for creating websites.Sites built with Logyahttps://exploring-data.comhttps://geeksta.nethttps://guitarstreams.comhttps://ramiro.orghttps://programminglanguages.infohttps://ukealong.comhttps://www.linux-netbook.com
Package: logz
LogzLog Easy 快速上手的日志记录工具特性上手容易日志文件按日期动态生成DayRottingLogger记录日志到Emailsafe extra fields支持多个变量multiline log and indent for jsondebug as default level安装方法$ pip install logz使用方法简单使用fromlogzimportloglog.debug('debug msg')log.info('info msg')log.warning('warning msg')log.error('error msg')log.critical('critical mst')try:assert0exceptAssertionErrorasex:log.exception(ex)输出:2019-12-12 22:39:43,584 DEBUG debug msg
2019-12-12 22:39:43,584 INFO info msg
2019-12-12 22:39:43,584 WARNING warning msg
2019-12-12 22:39:43,585 ERROR error msg
2019-12-12 22:39:43,585 CRITICAL critical mst
Traceback (most recent call last):
  File "/Users/apple/Documents/Projects/logz/logz/__init__.py", line 199, in <module>
    assert 0
AssertionError一次输出多个变量像print函数一样,log.info等方法可以一次输出多个变量a='hello'b=1c=[2]d={'name':'kevin'}log.info(a,b,c,d)输出:2019-12-12 22:40:20,221 INFO hello 1 [2] {'name': 'kevin'}注意: log方法中原来支持%s格式话的变量被修改为支持log多个变量
如果你想使用原有的日志方式:importlogginglogging.info('name=%s,age=%d','kevin',18)你可以将变量直接格式化到字符串中，如下：log.info('name=%s,age=%d'%('kevin',18))输出:2019-12-12 22:41:58,024 INFO name=kevin,age=18日志文件log.file='tmps/tmp.log'log.info('info msg')注意: 日志目录必须存在By default it's a rotting file and maxBytes=10240 and backUps=5按日期记录日志log.file='tmps/%Y-%m-%d.log'log.info('info msg')结果是一个按天滚动的日志文件，特别对于Flask等搭建等常驻型，Web服务，日志可以按天在新的日期自动生成新的日志，而无需重启记录日志到Email中废弃 ⚠️log.email=dict(host="smtp.sina.com",user='test_results@sina.com',password='***',receivers=['superhin@126.com'],capacity=10)foriinrange(20):log.error('这个是个错误日志')修改日志等级log.level = 'info'
log.level = logging.INFO
log.debug('not show')
log.info('show info')输出:2019-12-12 22:43:24,479 INFO show info使用字符串赋值level时大小写不敏感,log.level = 'info'或log.level = 'INFO'都可以修改日志格式log.format = '%(levelname)s|%(filename)s|%(funcName)s|%(lineno)d|%(message)s'使用额外字段log.format = '%(asctime)s %(levelname)s %(user)s %(message)s'
log.info('hello with no user')
log.info('hello with kevin', extra={'user': 'Kevin'})输出:2019-12-12 22:45:18,604 INFO None hello with no user
2019-12-12 22:45:18,604 INFO kevin hello with kevinJSON多行输出和字段缩进log.info({'foo':'bar'},indent=2)输出:2019-12-09 19:30:16,419 DEBUG log None ->
{
  "foo": "bar"
}使用logit装饰器使用logit装饰器在调用函数时将自动输出DEBUG日志，包含调用方、调用参数，返回值，耗时信息等fromlogzimportlogit@logitdefadd(a,b):returna+bdefcalc():add(1,20)calc()输出:2020-06-30 12:39:06,124 DEBUG calc -> add(1,20) return: 21 duration: 0.017280101776123047s对象方法中使用logitclassCalculator(object):@logitdefadd(self,a,b):returna+bCalculator.add(2,30)待完善通用extra字段及默认值配置log file to config maxBytes or elselog to htmllog to dblog difflog assertlog printlog to server using websocketmore decorators such as @explain @exception @timeit @emailsupport verbosityBugslogit装饰器在对象方法中报错还原为logging.getLogger后%(funcName)s字段显示不正确对比logginglogzlogzerologuru功能易用性
Package: logze
LOGZELibrary in Python to store logs in MongoDB and send notifications of errors to MS Teams.InstallInstalllogzeusingPyPIor directly viapip:pipinstalllogzeUsagefromlogze.recorder.loggerimportLogRecorderfromlogze.models.logimportLogrecorder=LogRecorder("{YOUR_CONN_STRING}","{DB_NAME}","{COLLECTION_NAME}","{MS_TEAMS_WEBHOOK}")log=Log("{SOURCE}","{LOG_TYPE}","{MESSAGE}","{EVENT}")recorder.record_log(log)Running unit tests$exportMONGO_URI="mongodb://user:password@host:port/?authMechanism=DEFAULT"$exportDB_NAME="YOUR_DB_NAME"$python-munittestdiscovertests
...
------------------------------------------------------------------------------
Ran3testsin0.144s

OKAuthor@josehenriqueroveda
Package: logzilla
1. Overviewlogzillais a simple yet capable python logging wrapper that gives you better defaults like coloured output.2. Table of Contents1. Overview2. Table of Contents3. Installation and usage3.1. Installation3.2. Examples3.3. Example 1: Minimal example3.4. Example 2: No file info to console4. Other Docs5. Future Improvements3. Installation and usage3.1. InstallationIt requires Python 3.8.1+ to run.pip install logzilla3.2. ExamplesIn both examples a.logfolder is created in the output directory with the
following files corresponding to the date and time of execution of each example:2023.04.10 15.54.23_logzilla.log2023.04.10 16.18.29_logzilla.logSample log file output:2023/04/10 15:55:16: logzilla.py:115: INFO: LogZilla: Root logger initialized.
2023/04/10 15:55:16: logzilla.py:121: INFO: ********************************************************************************
2023/04/10 15:55:16: logzilla.py:122: INFO: ******************************** LogZilla Demo *********************************
2023/04/10 15:55:16: logzilla.py:123: INFO: ********************************************************************************
2023/04/10 15:55:16: logzilla.py:183: DEBUG: debug message
2023/04/10 15:55:16: logzilla.py:184: INFO: info message
2023/04/10 15:55:16: logzilla.py:185: WARNING: warning message
2023/04/10 15:55:16: logzilla.py:186: ERROR: error message
2023/04/10 15:55:16: logzilla.py:187: CRITICAL: critical message
2023/04/10 15:55:16: logzilla.py:137: INFO: Execution Time of <main>: 0:00:00.012001 hh:mm::ss3.3. Example 1: Minimal example@log_execution_timedefmain()->None:current_file_path=Path(__file__).absolute()current_file_dir=current_file_path.parentLogZilla.init_root_logger(output_dir=current_file_dir,console_level=logging.DEBUG,file_level=logging.DEBUG,)log_title("LogZilla Demo")logger=logging.getLogger(__name__)logger.debug("debug message")logger.info("info message")logger.warning("warning message")logger.error("error message")logger.critical("critical message")Output:3.4. Example 2: No file info to console@log_execution_timedefmain()->None:current_file_path=Path(__file__).absolute()current_file_dir=current_file_path.parentLogZilla.init_root_logger(output_dir=current_file_dir,console_level=logging.DEBUG,file_level=logging.DEBUG,no_console_file_info=True,)log_title("LogZilla Demo")logger=logging.getLogger(__name__)logger.debug("debug message")logger.info("info message")logger.warning("warning message")logger.error("error message")logger.critical("critical message")Output:4. Other DocsDeveloper5. Future Improvementsadd unit testsadd pre-commit hooks forblack, pylint, flake8, bandit, tox, pytestfor development environment
Package: logzio-structlog-handler
logzio-structlog-handlerHandler to send structlog logger to logzioAll logs havehost,pidandtidadded to them.Example of log created with handler:logger.info("request_finished",request=f"{METHOD}{ENDPOINT}",code=response.status_code,request_id=uuid4())Logzio:"_source":{"request":"GET /account/ping","code":200,"level":"info","logger":"django_structlog.middlewares.request","ip":"127.0.0.1","log_level":"INFO","pid":1,"type":"http-bulk","message":"request_finished FOR GET /account/ping","tid":[140649178957632],"tags":["_logz_http_bulk_json_8070"],"@timestamp":"2022-01-10T19:34:19.932Z","line_number":71,"host":"name-of-host","event":"request_finished","request_id":"3777349e-0247-4c89-ace2-ea2174930f39","path_name":"path/to/file.py","timestamp":"2022-01-10T19:34:19.931955Z","random_tag_1":"some_value","random_tag_2":123}Instructions:Install❯pipinstalllogzio-structlog-handlerAdd the following handler to you LOGGING file:LOGGING={"handlers":{"logzio":{"class":"structlogzio.LogzIoStructlogHandler","level":"INFO","token":"YOUR_TOKEN","logs_drain_timeout":5,"url":"https://listener.logz.io:8071","network_timeout":10,# accepts any Dict[str, Any] value and passes it to all logs"tags":{"random_tag_1":"some_value","random_tag_2":123},}},"loggers":{"":{"level":"INFO","handlers":["logzio"],"propagate":True},},}
Package: logzy
IntroductionALPHA SOFTWARE: Use at your own risk. Carefully vet the suggestions.logzyis a linter / fixer that ensures Python log message arguments are in
lazy-logging format. This is recommended so that arguments to the log messages
are only rendered if they're emitted. Performance regressions can be occur if
objects are being rendered even if the log message isn't being emitted.For example:importlogginglog=logging.getLogger()user="root"# Badlog.warning(f"Login failed for{user}")# Goodlog.warning("Login failed for%s",user)You may have seen tools like pylint complain aboutlogging-fstring-interpolation,logging-format-interpolation, orlogging-not-lazy.InstallationpipinstalllogzyUsageSince logzy only works on f-strings right now, you probably want to convert
everything to an f-string first using a tool likeflyntorpyupgradeTODOMake quote character intelligentCheck for any quote chars inside message stringMake the default configurable on the command linelogging.log(level, f"{message}")Non f-string parameters to log functions (ie.format()or%)Untested f-strings:Multiline f-stringNested f-string
Package: loica
LOICAWelcome to the LOICA (Logical Operators for Integrated Cell Algorithms) repository, our Python package for designing, modeling and characterizing genetic networks.As you may have noticed, our logo features a beautiful bird—loica(Leistes loyca); a bird native to Chile known for its particular red chest and legendary kindness, with which we share name.Reference and citationLOICA is an academic open source software for science, if you want to reference or cite it please use the following:DOIhttps://doi.org/10.1021/acssynbio.1c00603Get the BibTeX inGoogle ScholarInstallationInstalling LOICA is way easier than pronuncing it!Do:pip install loicaFor more details please refer to ourWikifor installation instructions and developer guides.LOICA allows you to:Compile Code into DNA fragments that execute Cell AlgorithmsEasy programation of genetic network modelsGeneration of synthetic dataCommunicate with FlapjackUse and output SBOL filesUse all sorts of cellular computationEasy, fluid and customisable DNA designDocumentationPlease visit our documentation with API reference at Read the Docsloica.rtfd.ioTutorialsNow that you have LOICA installed you can familiarize yourself with the tool using theJupyter notebook tutorialsdesigned for this purpose.Run LOICA on the web without any installation!LOICA Colab NotebookYou can use and modify this code by saving a copy in Drive.
Package: loinchpo
loinchpoA simple and efficient library for mapping loinc test results to hpo terms.Documentation:https://thejacksonlaboratory.github.io/loinchpo/RequirementsPython 3.5+Installing with pippipinstallloinchpoInstalling with Condacondaconfig--addchannelsconda-forge
condaconfig--setchannel_prioritystrict
condainstallloinchpo
Package: lois
loisThe fastest and easy way to get insight of your datasetPurpose of the packageThe purpose of this package is to provide to data scientist and data analyst a faster way to get insight of  their dataset .FeaturesEDA SimplificationGetting StartedThe package can be found on pypi hence you can install it using pipInstallationpipinstallloisUsage# Import packages>>>importpandasaspd>>>fromloisimportlois_ds_report#Import your dataset>>>data=pd.read_csv("your data path")#Simple report with lois>>>lois_ds_report(data,target_variable="gender",report_complexity="simple")#Advanced report with lois>>>lois_ds_report(data,target_variable="gender",report_complexity="advanced")ContributionContribution are welcome.
Notice a bug ? let us know. Thanks youAuthorMain Maitainer : Charles TCHANAKEemail :datadevfernolf@gmail.comAdditionnal NoteIn very large dataset lois may take time to process all the data
Package: lois-lane
Lois LaneA tool to write reports.Free software: MIT licenseDocumentation:https://lois-lane.readthedocs.io.This is based on a blog post I wrote in 2008 because nobody bothered implementing my idea.
So,feel free to read itFeaturesCreates reports by merging data (in JSON) and a Jinja templateExamplelois_lane --data example/data.json --template example/template.j2 --output report.rstThe example report isreStructured textbut you can just as easily do markdown, HTML, or whatever.TODOProvide helper sets for different output formats.Support postprocessing chains to generate PDF or whateverCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.0.1 (2017-11-30)First release on PyPI.
Package: loit
LOIT - Lot Of Indic TweetsInstallationpip install loitUsageimport loit

# download data
# hindi and telugu are available as of now
loit.download('hindi', 'data')

# download fasttext cbow vectors and read them 
loit.load_vectors('hindi', 'cbow')

# download fasttext skipgram vectors and read them
loit.load_vectors('hindi', 'skipgram')

# read the jsons from data
#returns iterator that yields jsons
it = loit.read_data('telugu')

for tweet_json in it:
    print(tweet_json['tweet'])
    input()ToDOTrain a DeepMoji type of model on this data.
Package: lojbantools
This library most notably wraps camxes, a lojban parser generated by Rats!
as a java jarfile.
It also wraps vlatai from the jbofihe package, which does morphological
analysis of lojban words.
The third thing it wraps is makfa, which is a word lookup tool.Additional DependenciesSince camxes is a java file, you need aJavavirtual machine or something
else that lets you run jarfiles. In addition to that, you also need thejbofihepackage to get vlatai for morphological analysis andmakfafor
selma’o lookup (and more in the future).
Package: loki-api-client
Add a short description here!DescriptionA longer description of your project goes here…Making Changes & ContributingThis project usespre-commit, please make sure to install it before making any
changes:pip install pre-commit
cd loki-api-client
pre-commit installIt is a good idea to update the hooks to the latest version:pre-commit autoupdateDon’t forget to tell your contributors to also install and use pre-commit.NoteThis project has been set up using PyScaffold 4.0.2. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: loki-assistant
Loki AssistantThe Loki Assistant has been created to send log messages to the LOKI server. The labels can be specified individually.InstallYou can install this package with pip tool fromhttps://pypi.org/.pipinstallloki-assistantUsageThere are three ways to send messages to the server.Each message individuallySending every single message takes a lot of time. 6000 messages takes 3.67 s to send.fromdatetimeimportdatetimefromloki_assistantimportLokiAssistantloki=LokiAssistant('http://localhost:3100/loki/api/v1/push',primary_tags={"application":"test"})loki.post(loki.LogLevels.VERBOSE,{"thread":"1"},datetime.now(),f"messsage: DEBUG")loki.post(loki.LogLevels.DEBUG,{"thread":"1"},datetime.now(),f"message: DEBUG")loki.post(loki.LogLevels.INFO,{"thread":"1"},datetime.now(),f"message: INFO")loki.post(loki.LogLevels.WARNING,{"thread":"1"},datetime.now(),f"message: WARNING")loki.post(loki.LogLevels.ERROR,{"thread":"1"},datetime.now(),f"message: ERROR")loki.post(loki.LogLevels.FATAL,{"thread":"1"},datetime.now(),f"message: FATAL")Collect messagesIf several messages are sent together, a lot of time can be saved and the performance can be increased. Sending 60000 messages takes 0.660 s.Push all togetherfromdatetimeimportdatetimefromloki_assistantimportLokiAssistantloki=LokiAssistant('http://localhost:3100/loki/api/v1/push',primary_tags={"application":"test"})loki.commit(loki.LogLevels.VERBOSE,{"thread":"1"},datetime.now(),f"messsage: DEBUG")loki.commit(loki.LogLevels.DEBUG,{"thread":"1"},datetime.now(),f"message: DEBUG")loki.commit(loki.LogLevels.INFO,{"thread":"1"},datetime.now(),f"message: INFO")loki.commit(loki.LogLevels.WARNING,{"thread":"1"},datetime.now(),f"message: WARNING")loki.commit(loki.LogLevels.ERROR,{"thread":"1"},datetime.now(),f"message: ERROR")loki.commit(loki.LogLevels.FATAL,{"thread":"1"},datetime.now(),f"message: FATAL")loki.push()Push them over a time interval.fromdatetimeimportdatetimefromloki_assistantimportLokiAssistantloki=LokiAssistant('http://localhost:3100/loki/api/v1/push',primary_tags={"application":"test"},push_interval=1)loki.commit(loki.LogLevels.VERBOSE,{"thread":"1"},datetime.now(),f"messsage: DEBUG")loki.commit(loki.LogLevels.DEBUG,{"thread":"1"},datetime.now(),f"message: DEBUG")loki.commit(loki.LogLevels.INFO,{"thread":"1"},datetime.now(),f"message: INFO")loki.commit(loki.LogLevels.WARNING,{"thread":"1"},datetime.now(),f"message: WARNING")loki.commit(loki.LogLevels.ERROR,{"thread":"1"},datetime.now(),f"message: ERROR")loki.commit(loki.LogLevels.FATAL,{"thread":"1"},datetime.now(),f"message: FATAL")
Package: loki-client
loki-clientA Python client interacting with Grafana Loki.QuickstartInstall:pipinstallloki-clientUsage:# example.pyfromloki_clientimportLokiClientfromloki_clientimportSUPPORTED_DIRECTIONloki_url='http://localhost:3100'loki_client=LokiClient(url=loki_url,disable_ssl=True)# 1 test ready()loki_ready=loki_client.ready()ifnotloki_ready:print('Loki is not ready.')exit(1)# 2 test query_range_with_context()query=r'{host="ubuntu"}|~"error"'result=loki_client.query_range_with_context(query=query,context_before=5,context_after=3)ifresult[0]:print(result)# 3 test post()label_dic={'host':'windows','env':'test'}logs_lst=['This is line 1','This is line 2','This is line 3','This is line 4']result=loki_client.post(label_dic,logs_lst)ifnotresult[0]:print(result[1])# 4 test labels()result=loki_client.labels()print(result)# 5 test query_range()query=r'{host="ubuntu"}|~"error"'result=loki_client.query_range(query,direction=SUPPORTED_DIRECTION[1],limit=10)print(result)ifresult[0]:print(result[1]['status'])print(result[1]['data']['resultType'])# 6 test query()result=loki_client.query(query,direction=SUPPORTED_DIRECTION[1],limit=10)print(result)
Package: lokidb-sdk
py-clientLokiDB python client SDKExamplefromrandomimportrandrangefromlokidb_sdkimportClientc=Client([("localhost",50051),("localhost",50052),("localhost",50053),("localhost",50054),("localhost",50055),])for_inrange(1000):key=f'{randrange(-99999999,99999999)}'value=f'{randrange(-99999999,99999999)}'*10c.set(key,value)print(c.get(key))# Get all keys from all nodesprint(c.keys())# Close connection to all nodesc.close()APIMethodInputOutputGetkey (str)value (str)Setkey (str), value (str)Delkey(str)Keyslist of keys (list[str])Flush
Package: loki-handler
loki-handlerPython logging handler for Loki.https://grafana.com/lokiBackport ofAndrey Maslov'spython-logging-lokifor Python 2.X.Installationpipinstallloki-handlerUsageimportloggingimportloki_handlerhandler=loki_handler.LokiHandler(url="https://my-loki-instance/loki/api/v1/push",tags={"application":"my-app"},auth=("username","password"),version="1",)logger=logging.getLogger("my-logger")logger.addHandler(handler)logger.error("Something happened",extra={"tags":{"service":"my-service"}},)Example above will sendSomething happenedmessage along with these labels:Default labels from handlerMessage level asserverityLogger's name asloggerLabels fromtagsitem ofextradictThe given example is blocking (i.e. each call will wait for the message to be sent).
Package: lokilogger
LokiloggerIntroductionThis package is just a wrapper aroundloggingandcolorlog.InstallationpipinstalllokiloggerUsageAt the start of your programfromlokilogger.loggingimportset_log_modeimportloggingenv=os.getenv("LOGMODE","DEV")set_log_mode("env")# A global setting here, you can set it to `PROD`, `DEV`or `DEV_NO_COLOR`Use it in other moduleslogger=logging.getLogger(__name__)logger.error('error message')Outputenv=Prod"time":"2022-01-15 07:56:05,440, ""severity":"INFO","logger":"root","module":"logging","message":"Dev env is set to production""time":"2022-01-15 07:56:05,440, ""severity":"ERROR","logger":"__main__","module":"test","message":"error message""time":"2022-01-15 07:56:05,440, ""severity":"INFO","logger":"root","module":"test","message":"error message"env=DEV_NO_COLOR2022-01-1507:54:40,039|INFO|root|Devenvissettodevelopmentwithoutcolorlog2022-01-1507:54:40,039|ERROR|__main__|errormessage2022-01-1507:54:40,039|INFO|root|errormessage
Package: loki-logger-handler
loki_logger_handlerA logging handler that sends log messages to Loki in JSON formatFeaturesLogs pushed in JSON formatCustom labels definitionAllows defining loguru and logger extra keys as labelsLogger extra keys added automatically as keys into pushed JSONPublish in batch of StreamsPublis logs compressedArgsurl (str): The URL of the Loki server.labels (dict): A dictionary of labels to attach to each log message.labelKeys (dict, optional): A dictionary of keys to extract from each log message and use as labels. Defaults to None.timeout (int, optional): The time in seconds to wait before flushing the buffer. Defaults to 10.compressed (bool, optional): Whether to compress the log messages before sending them to Loki. Defaults to True.defaultFormatter (logging.Formatter, optional): The formatter to use for log messages. Defaults to LoggerFormatter().FormattersLoggerFormatter: Formater for default python logging implementationLoguruFormatter: Formater for Loguru python libraryHow to useLoggerfromloki_logger_handler.loki_logger_handlerimportLokiLoggerHandler,importloggingimportos# Set up logginglogger=logging.getLogger("custom_logger")logger.setLevel(logging.DEBUG)# Create an instance of the custom handlercustom_handler=LokiLoggerHandler(url=os.environ["LOKI_URL"],labels={"application":"Test","envornment":"Develop"},labelKeys={},timeout=10,)# Create an instance of the custom handlerlogger.addHandler(custom_handler)logger.debug("Debug message",extra={'custom_field':'custom_value'})Logurufromloki_logger_handler.loki_logger_handlerimportLokiLoggerHandler,LoguruFormatterfromloguruimportloggerimportosos.environ["LOKI_URL"]="https://USER:PASSWORD@logs-prod-eu-west-0.grafana.net/loki/api/v1/push"custom_handler=LokiLoggerHandler(url=os.environ["LOKI_URL"],labels={"application":"Test","envornment":"Develop"},labelKeys={},timeout=10,defaultFormatter=LoguruFormatter(),)logger.configure(handlers=[{"sink":custom_handler,"serialize":True}])logger.info("Response code{code}HTTP/1.1 GET{url}",code=200,url="https://loki_handler.io")Loki messages samplesWithout extra{"message":"Starting service","timestamp":1681638266.542849,"process":48906,"thread":140704422327936,"function":"run","module":"test","name":"__main__"}With extra{"message":"Response code  200 HTTP/1.1 GET https://loki_handler.io","timestamp":1681638225.877143,"process":48870,"thread":140704422327936,"function":"run","module":"test","name":"__main__","code":200,"url":"https://loki_handler.io"}Exceptions{"message":"name 'plan' is not defined","timestamp":1681638284.358464,"process":48906,"thread":140704422327936,"function":"run","module":"test","name":"__main__","file":"test.py","path":"/test.py","line":39}Loki Query SampleLoki query sample :{envornment="Develop"} |= `` | jsonFilter by level:{envornment="Develop", level="INFO"} |= `` | jsonFilter by extra:{envornment="Develop", level="INFO"} |= `` | json | code=`200`LicenseThe MIT License