Saravanan666/pypi-org huggingface dataset:
Package: loglicense
Log LicenseA tool for helping developers staying compliant within their software projects. The tool crawls dependencies and logs their licenses, allowing to document and restrict certain licenses within a software project.DISCLAIMER:There is no guarentee that all sublicenses or licenses will be identified and reported. For highest ensurance, use lock files to also catch sub-dependencies. However, this only looks within the given package manager, meaning C libraries and alike will not be reported here.FeaturesReport and save log of licenses included in projectCheck coverage of packages supported accepted licensesSupporting pre-commits with coverage thresholds and allowing manual validation of unknown license typesSupported dependency filesThough the tool supports multiple file types, it ishighly recommendedto use lock files or do a ´pip freeze > requirements.txt´ in order to ensure all sub-dependencies are also evaluated for their license.poetry.lockpyproject.toml (traditional and poetry)requirements.txt (--develop adds search for requirements_dev.txt)Supported package managerspypiInstallationYou can installLog LicenseviapipfromPyPI:$pipinstallloglicenseor usingPoetry$poetryaddloglicenseQuick examplePlease see theCommand-line Referencefor details.$loglicensereportpath_to/poetry.lockExample output:| Name               | License                            ||:-------------------|:-----------------------------------|| click              | BSD-3-Clause                       || colorama           | BSD                                || importlib-metadata | Apache Software License            || pathlib            | MIT License                        || tabulate           | MIT                                || toml               | MIT                                || typer              | MIT License                        || typing-extensions  | Python Software Foundation License || zipp               | MIT License                        |Alternatively you can let it search the executed directory for any supported file$loglicensereportFeatures to implementSupport npmjs package manager (and package.json/package-lock.json)Support Pipfile, Pipfile.lock, conda.yaml, pip freezeContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theApache 2.0 license,Log Licenseis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.This project is greatly inspired bydep-licensecreated byAbdulelah Bin Mahfoodh.
Package: loglifos
A logger python project,-----------------------------------------------------------------v
 u           ,-~~\   <~)_   u\             /\    ,-.       ,-.     u
 u  _,===-.,  (   \   ( v~\ u u  _,===-.,  \/   <,- \_____/  `     u
 u (______,.   u\. \   \_/'  \u (______,. /__\    /  ___. \  -===- u
 u            _a_a`\\  /\     u           \--/ ,_(__/ ,_(__\       u
 `--------------------------------------------- By CenturyBoys ----yThis is a non block JSON logger that use python's default logger with a thread executor.By default loglifos set the default root loger to ERROR levelSettingsYou can change loglifos log level usingset_configmethod. Loglifos use the same level constants as the default logging python lib.importloglifosloglifos.set_config(loglifos.ERROR)Usingimportloglifostry:a=1/0exceptExceptionase:loglifos.debug("Message from debug","some args",1,some__kwargs="Kwargs of debug")loglifos.info("Message from info","some args",1,some__kwargs="Kwargs of info")loglifos.warning("Message from warning","some args",1,some__kwargs="Kwargs of warning")loglifos.error("Message from error","some args",1,some__kwargs="Kwargs of error",exception=e)loglifos.critical("Message from critical","some args",1,some__kwargs="Kwargs of critical"){"time":"2023-01-25 13:27:34.896765","level":"ERROR","file":"/home/marco/.config/JetBrains/PyCharmCE2022.3/scratches/scratch_1.py","function":"<module>","msg":"Message from error","some__kwargs":"'Kwargs of error'","args":"('some args', 1)","error":"Traceback (most recent call last):\n  File \"/home/marco/.config/JetBrains/PyCharmCE2022.3/scratches/scratch_1.py\", line 9, in <module>\n    a = 1 / 0\nZeroDivisionError: division by zero\n"}{"time":"2023-01-25 13:27:34.899420","level":"DEBUG","file":"/home/marco/.config/JetBrains/PyCharmCE2022.3/scratches/scratch_1.py","function":"<module>","msg":"Message from debug","some__kwargs":"'Kwargs of debug'","args":"('some args', 1)"}{"time":"2023-01-25 13:27:34.899676","level":"INFO","file":"/home/marco/.config/JetBrains/PyCharmCE2022.3/scratches/scratch_1.py","function":"<module>","msg":"Message from info","some__kwargs":"'Kwargs of info'","args":"('some args', 1)"}{"time":"2023-01-25 13:27:34.899885","level":"WARNING","file":"/home/marco/.config/JetBrains/PyCharmCE2022.3/scratches/scratch_1.py","function":"<module>","msg":"Message from warning","some__kwargs":"'Kwargs of warning'","args":"('some args', 1)"}{"time":"2023-01-25 13:27:34.900066","level":"CRITICAL","file":"/home/marco/.config/JetBrains/PyCharmCE2022.3/scratches/scratch_1.py","function":"<module>","msg":"Message from critical","some__kwargs":"'Kwargs of critical'","args":"('some args', 1)"}
Package: logloss-beraf
What is logloss-beraf?----------------------A tool for selection of a limited number of informative DNA methylationregions (i.e. sites) based on a combination of several feature selectionmethods and an ensemble-based classifier. It is expected to handle higlyunbalanced and heterogeneous data. Also it is intended for the designof diagnostic panels that can be potentially used in routine laboratory practice.Quick start-----------1. Install ``logloss-beraf`` with all the dependencies::easy_install logloss-beraf2. Make a test run. It uses data included to the package::logloss_beraf test_run3. Prepare input feature and annotation tables (in CSV format). The order of samples in those tables is supposed to be the same```# Methylation dataFeature_1 Feature_2  Feature_3Sample_0   0.909642  0.823715   0.069785Sample_1   0.564799  0.199724   0.840741Sample_2   0.685081  0.489773   0.286591Sample_3   0.810637  0.006836   0.888038Sample_4   0.124098  0.347752   0.954853``````# Annotation dataSample_Name  TypeSample_0     BenignSample_1     PathologicSample_2     BenignSample_3     BenignSample_4     Pathologic```4. `Train model````shlogloss_beraf train \--features path_to_feature_table \--features_max_num 10 \--min_beta_threshold 0.2 \--annotation path_to_annotation_table \--sample_name_column "Sample_Name" \--class_column "Type" \--output_folder path_to_output_folder```5. `Apply trained model to independent dataset````shlogloss_beraf apply \--features path_to_test_feature_table \--model path_to_trained_model--output_folder path_to_output_folder```
Package: logma
logmaGreat default logging.UsageInstall:% pip install logmaExample file:% cat example/logex.py
from logma.wech import datlog
import structlog


# auto detects tty and outputs json or text accordingly
datlog()


log = structlog.get_logger("logex")


def main():
    log.info("Hello")
    log.warn("Hello")
    log.error("Hello")
    log.debug("Hello")


if __name__ == "__main__":
    main()Usage in the console (it uses colorama):% env/bin/python example/logex.py
2020-03-04T11:27:41.523012Z [info     ] Hello                          [logex] func=main lineno=13 module=__main__
2020-03-04T11:27:41.529786Z [warning  ] Hello                          [logex] func=main lineno=14 module=__main__
2020-03-04T11:27:41.529982Z [error    ] Hello                          [logex] func=main lineno=15 module=__main__
2020-03-04T11:27:41.530156Z [debug    ] Hello                          [logex] func=main lineno=16 module=__main__Usage in background (json output to stderr):% env/bin/python example/logex.py &> logex.log && cat logex.log
{"event": "Hello", "level": "info", "logger": "logex", "timestamp": "2020-03-04T11:28:17.565149Z", "module": "__main__", "lineno": 13, "func": "main"}
{"event": "Hello", "level": "warning", "logger": "logex", "timestamp": "2020-03-04T11:28:17.571626Z", "module": "__main__", "lineno": 14, "func": "main"}
{"event": "Hello", "level": "error", "logger": "logex", "timestamp": "2020-03-04T11:28:17.571821Z", "module": "__main__", "lineno": 15, "func": "main"}
{"event": "Hello", "level": "debug", "logger": "logex", "timestamp": "2020-03-04T11:28:17.571995Z", "module": "__main__", "lineno": 16, "func": "main"}
Package: logmag
logmagThis library defines a simple logging system with different log levels and colored output for different levels.InstallationYou can install the Logger Library using pip:pipinstalllogmagUsageInitializing the Logger:fromloggerimportLoggerCreate a loggermy_logger=Logger('my_logger')Logging Messages:The Logger provides five levels of logging: DEBUG, INFO, WARNING, ERROR, and CRITICAL.Debug Messages:my_logger.debug('This is a debug message')Info Messages:my_logger.info('This is an informational message')Warning Messages:my_logger.warning('This is a warning')Error Messages:my_logger.error('This is an error message')Critical Messages:my_logger.critical('This is a critical error')The messages will be printed to the console with timestamps and colored according to their severity.Example# Example UsagefromlogmagimportLoggermy_logger=Logger('my_logger')my_logger.debug('This is a debug message')my_logger.info('This is an informational message')my_logger.warning('This is a warning')my_logger.error('This is an error message')my_logger.critical('This is a critical error')ContactFor questions, bug reports, or contributions, please visit the Gitlab repository:https://gitlab.com/test4521437/a3.
Package: logmail
logmailA simple package for sending emails (as simple, as writing logs withloguru)Installpip install logmailor withpoetry:poetry add logmailUsageSetting global config:from logmail import mailer

mailer.configure(
    smtp_host="mail.example.com",
    smtp_port=25,
    smtp_timeout=2,
    service_name="AWESOME SERVICE",
    recipient_list=["foo@example.com", "bar@example.com"],
    mail_from="Cool Mailer <noreply-some-service@example.com>",
)From any *.py file in your awesome project:from logmail import mailer

mailer.debug("This is debug message!")
mailer.info("This is info message!")
mailer.success("This is success message!")
mailer.warning("This is warning message!")
mailer.error("This is error message!")
mailer.critial("This is critial message!")If you need to send email with custom params:from logmail import mailer
...
mailer.send_mail(
    subject="Some subject", 
    message="Some message",  # may be html string
    mail_from="Mr Foo <foo@example.com>",
    recipient_list=["fizzbuzz@example.com"]
)Advanced usageYou may see debugging info while sending emails by:from logmail import mailer

...

with mailer.debugging():
    mailer.info("Mail sent with debugging this process")You may easily set production and testing config by:from logmail import mailer

mailer.configure(
    smtp_host="mail.example.com",
    smtp_port=25,
    smtp_timeout=2,
    service_name="AWESOME SERVICE",
    recipient_list=["foo@example.com", "bar@example.com"],
    mail_from="Cool Mailer <noreply-some-service@example.com>",
    testing=True,
    test_service_name="SOME TEST SERVICE",
    test_recipient_list=["testfoo@example.com", "testbar@example.com"],
    test_mail_from="Testing Cool Mailer <test-noreply-some-service@example.com>",
)Setting global debugging while sending mails:from logmail import mailer

# at configuration time
mailer.configure(
    ...
    debug=True
)

# in other place
mailer.set_debug(debug=True)You may also set limit of exceptions in traceback (if it was raised):from logmail import mailer

# at configuration time
mailer.configure(
    ...
    traceback_limit=666
)

# in other place
mailer.set_traceback_limit(666)If you need to convert summary and message to html by default, try this:from logmail import mailer

# at configuration time
mailer.configure(
    ...
    convert_all_data_to_html=True
)

# in other place
mailer.set_convert_all_data_to_html(True)Note: logmail will applyconvert_str_to_htmlmethod to summary and message with its default params every time when logmail sends not custom message
Package: logmap
logmapA hierarchical, context-manager logger utility with multiprocess mapping capabilitiesInstall!pip install git+https://github.com/quadrismegistus/logmapUsagefromlogmapimportlogmapBasic usagewithlogmap('testing...'):# ... do something ...passtesting... @ 2023-12-12 12:58:19,866
⎿ 0 seconds @ 2023-12-12 12:58:19,867Getting duration# get durationwithlogmap('testing...')aslm:naptime=lm.nap()testing... @ 2023-12-12 12:58:19,874
￨ napping for 0.4 seconds @ 2023-12-12 12:58:19,875
⎿ 0.4 seconds @ 2023-12-12 12:58:20,280assertnaptime==lm.durationNested loggingwithlogmap('testing nested logging')aslm:withlogmap('opening nest level 2')aslm2:withlogmap('opening nest level 3')aslm3:lm3.nap()testing nested logging @ 2023-12-12 12:58:20,292
￨ opening nest level 2 @ 2023-12-12 12:58:20,293
￨ ￨ opening nest level 3 @ 2023-12-12 12:58:20,294
￨ ￨ ￨ napping for 0.3 seconds @ 2023-12-12 12:58:20,294
￨ ￨ ⎿ 0.3 seconds @ 2023-12-12 12:58:20,599
￨ ⎿ 0.3 seconds @ 2023-12-12 12:58:20,600
⎿ 0.3 seconds @ 2023-12-12 12:58:20,601Mappingimportrandom,time# get objs to mapobjs=list(range(5))# define function to mapdeffunction_to_map(naptime):naptime=random.random()*naptime/2time.sleep(naptime)returnnaptime# open the logmapwithlogmap('testing function mapping')aslm:# get results as a listresults=lm.map(function_to_map,objs,num_proc=2)testing function mapping @ 2023-12-12 13:00:31,037
￨ mapping function_to_map to 5 objects [2x]: 100%|██████████| 5/5 [00:02<00:00,  2.09it/s]
⎿ 2.4 seconds @ 2023-12-12 13:00:33,433Or get a generator for results as they arrive (in order):withlogmap('testing function mapping')aslm:# this is a generatorresults_iter=lm.imap(function_to_map,objs,num_proc=2)# loop as results arriveforresinresults_iter:# this will update progress barlm.log(f'got result:{res:.02}')testing function mapping @ 2023-12-12 13:01:23,981
￨ got result: 1.7 [2x]: 100%|██████████| 5/5 [00:02<00:00,  1.99it/s]             
⎿ 2.5 seconds @ 2023-12-12 13:01:26,500
Package: logmaster
LogmasterA simple logging package for PythonInstallationpipinstalllogmasternote: this package is not yet on PyPI, so you will have to install it from source.
Depending on your python installation, the command mayt vary. For example, if you are using python3, you may need to usepip3instead ofpip.UsagefromlogmasterimportLoggerlogger=Logger("my_log_file.log")logger.log("info","Hello, world!")DocumentationLoggerLogger(path: str)Creates a new logger object. The path argument is the path to the log file. If the file does not exist, it will be created. If it does exist, it will be appended to.Logger.log(level: str, message: str, additional_info: Optional[str])Logs a message to the log file. The level argument is the level of the message. The message argument is the message to log. The additional_info argument is optional, and is used to provide additional information about the message.
Package: logmatic-python
logmatic-pythonLink to the Logmatic.io documentation: http://doc.logmatic.io/docs/pythonPython helpers to send logs to Logmatic.io.It mainly contains a proper JSON formatter and a socket handler that
streams logs directly to Logmatic.io - so no need to use a log shipper
if you don’t wan’t to.Pre-requirementsTo install this library, use the following command:pip install logmatic-pythonUsageUse the JSON formatterTo use the JSON formatter, simply associate it to any handler such as
the StreamHandler here.importlogmaticimportlogginglogger=logging.getLogger()handler=logging.StreamHandler()handler.setFormatter(logmatic.JsonFormatter(extra={"hostname":socket.gethostname()}))logger.addHandler(handler)logger.setLevel(logging.INFO)Once this setup is done, any child logger will use this configuration
(eglogging.getlogger("my_logger")). As you can see, you can
associate any extra information to the base formatter such as the
hostname here or any environment variable you’ll need depending of your
usage.test_logger=logging.getLogger("test")test_logger.info("classic message",extra={"special":"value","run":12})Returns the following format:{"asctime":"2016-02-16T09:51:31Z","name":"test","processName":"MainProcess","filename":"write_in_console.py","funcName":"<module>","levelname":"INFO","lineno":20,"module":"write_in_console","threadName":"MainThread","message":"classic message","special":"value","run":12,"timestamp":"2016-02-16T09:51:31Z","hostname":"<your_hostname>"}Let’s take some time here to understand what we have:The default format is “%(asctime) %(name) %(processName) %(filename)
%(funcName) %(levelname) %(lineno) %(module) %(threadName)
%(message)”. So that’s why all these attributes are present on all
the log events. If you need less, you can change the format when
defining the formatter:logmatic.JsonFormatter(fmt="",...)Thehostnameattribute here is added all the time as it was
defined on the root logger.Thespecialandrunattributes were added specifically to
this log event.Good to know, an traceback from an exception is totally wrapped into the
JSON event. That’s suppress the handling of multiline formatting:{..."exc_info":"Traceback (most recent call last):\n  File \"test/write_in_console.py\", line 24, in exception_test\n    raise Exception('test')\nException: test",...}Stream log straight to Logmatic.ioThe LogmaticHandler can be coupled to the JsonFormatter as follow:importlogmaticimportlogginglogger=logging.getLogger()handler=logmatic.LogmaticHandler("<your_api_key>")handler.setFormatter(logmatic.JsonFormatter(extra={"hostname":socket.gethostname()}))logger.addHandler(handler)logger.setLevel(logging.INFO)Don’t forget to replace by the one provided on your Logmatic.io’s
platform.With this configuration, any log coming from your Python’s application
will be sent to your platform and will fulfill the same format as
described in the previous section.Please contact us if you want anything more to be added in this toolset!
Package: logme
Logme is a Python package that makes logging simple and robust. If you have found
logging in Python not so straight forward, download this package and give it a try! :)V1.3.0 Updateslogme.inifile now supports customedatefmtandstyle! Thanks to@afunTWsuggestion! :)Here is an example of how you can specify these parameters in yourlogme.iniconfiguration:[my_config]level=DEBUGformatter=fmt:{asctime} - {name} - {levelname} - {message}datefmt:%Y/%m/%dstyle:{stream=type:StreamHandleractive:Truelevel:DEBUGfile=type:FileHandleractive:Truelevel:DEBUGformatter:{name} :: {funcName} :: {levelname} :: {message}filename:mylogpath/foo.logNote: Only top levelmaster_formattersupports parameters as shown above, individual handler formatter will not.Terminal Color Outputlogmesupports color and styling output in the terminal!The colors and style iscustomizableinlogme.ini, here is a screenshot of how it looks like in the terminal:To use color output in logme, make sure your logme package andlogme.iniisup-to-dateif you are using a version before 1.2.0.Check the configuration detailshere.In A NutshellIf you have a function you want to log, you can do this in your python file:importlogme@logme.logdefmy_awesome_function(my_arg,logger=None):logger.info('this is my log message')"""rest of the function"""You can do the same with classes too:importlogme@logme.logclassMyAwesomeClass:defmy_function(self,my_arg):self.logger.info('this is my log message')pretty nice right? :)To get started, head to thequickstartpage.Installation$ pipenv install logme
✨🍰✨DocumentationYou can find the documentation athttps://logme.readthedocs.io/en/latest/.
Give it a try!
Package: logmein-api-client
LogMeIn API python client.PackageExamplefromlogmeinapiimportclientaslogmein# Using default configurationclient=logmein.Client()# Using specific endpointclient=logmein.Client(endpoint='toto')CredentialsCredentials are fetched from, in priority order: - ./logmein.conf
(script directory) - $HOME/.logmein.conf - /etc/logmein.confExample[default]; general configuration: default endpointendpoint=account[account1]; configuration specific to 'account1' endpointcompanyId=1234psk=abcde[account2]; other configurationcompanyId=4321psk=abcdeTestsTesting is set up usingpytestand coverage is
handled with the pytest-cov plugin.Run your tests withpy.testin the root directory.Coverage is ran by default and is set in thepytest.inifile. To see
an html output of coverage openhtmlcov/index.htmlafter running the
tests.TODOTravis CIThere is a.travis.ymlfile that is set up to run your tests for
python 2.7 and python 3.2, should you choose to use it.TODO
Package: log-metrics
log-metricslog-metrics is a tiny metrics logger, based on the l2met format. Meant for use on
Heroku, his allows you to send custom metrics toLibrato.You can find more information on these custom metricshere.Installation$pipinstalllog-metricsUsageEverything takes place from the log_metrics module, which can be imported like
so:>>>importlog_metricsSamples>>>log_metrics.sample('process.foo.memory.mb','52.54')sample#process.foo.memory.mb=52.54Measurements>>>log_metrics.measure('myfoo.ms','150')measure#myfoo.ms=150Uniques>>>log_metrics.unique('user.clicked','bob')unique#user.clicked=bob>>>log_metrics.unique('user.clicked','joey')unique#user.clicked=joey>>>log_metrics.unique('user.clicked','jenny')unique#user.clicked=jennyCounters>>>log_metrics.increment('myfoo')count#myfoo=1>>>log_metrics.increment('myfoo',3)count#myfoo=3Timers>>>withlog_metrics.timer('my-timed-context'):...time.sleep(1)measure#my-timed-context.ms=1001.20>>>@log_metrics.timer('my-timed-decorator'):...defmy_func():...time.sleep(0.5)>>>my_func()measure#my-timed-decorator.ms=504.20Metric Groups>>>withlog_metrics.group()asg:...g.measure('my-measurement',2)...g.increment('my-counter')measure#my-measurement=2 count#my-counter=1>>>g=log_metrics.group()>>>g.measure('my-measurement',2)>>>g.increment('my-counter')>>>g.emit()measure#my-measurement=2 count#my-counter=1Sources and PrefixesSources and prefixes can be defined like so:>>>log_metrics.increment('my-counter',prefix='awesome')count#awesome.my-counter=1>>>log_metrics.measure('my-measurement',50,source='testing')source=testing measure#my-measurement=50These arguments are also supported for group functions:>>>g=log_metrics.group(prefix='my-prefix',source='my-metric-source')>>>g.increment('my-amount')>>>g.increment('my-measurement')>>>g.emit()source=my-metric-source count#my-prefix.my-amount=1 count#my-prefix.my-amount1=1 count#my-prefix.my-amount2=1History0.0.4 (2014-04-17)‘group’ API now operational outside of a context manager.Minor code changes.0.0.3 (2014-04-14)Introduced the ‘group’ API.0.0.2 (2014-04-14)Added more documentation for simple usage.Worked on installation utilities.Still no tests :(.0.0.1 (2014-04-14)Initial release.
Package: logmetrics-sdk
logmetrics-sdkLogMetrics framework provides simplified configuration to log payload for python project.Usage - Python Flask ProjectsDemo Project-logmetrics-python-demoRelease History1.0.3logging rest verb & payload to console.feature to enable/disable payload loggingContributingFork it!Create your feature branch:git checkout -b my-new-featureCommit your changes:git commit -am ‘Add some feature’Push to the branch:git push origin my-new-featureSubmit a pull request :DFree software: Apache Software License 2.0Documentation:logmetrics-sdkHistory0.0.1 (2019-11-07)First release on PyPI.