Saravanan666/pypi-org huggingface dataset:
Package: almost_requested
Almost RequestedThis module provides a simple wrapper aroundrequeststo make accessing
APIs a little more simple.You start off by providing a requests.session, pre-configured with the required headers, then AlmostRequested will
construct the URL you are accessing by taking the dotted path of the AlmostRequested instance, converting it into
a URL, and returning a new AlmostRequested object, ready to call get, put, post or delete on, which themselves return
arequests.Response.classGithub(AlmostRequested):def__init__(self)->None:s=requests.session()self.GITHUB_TOKEN=os.environ["GITHUB_TOKEN"]s.headers["Authorization"]=f"Bearer{self.GITHUB_TOKEN}"s.headers["Content-Type"]="application/vnd.api+json"base_url="https://api.github.com"super().__init__(s,base_url)defget_asset(self,asset:dict[str,str])->None:s=requests.session()s.headers["Authorization"]=f"Bearer{self.GITHUB_TOKEN}"s.headers["Accept"]="application/octet-stream"ifos.path.exists(asset["name"]):returnprint("downloading",asset["name"],asset["url"])withs.get(url=asset["url"],stream=True)asr:r.raise_for_status()withopen(asset["name"],"wb")asf:forchunkinr.iter_content(chunk_size=8192):f.write(chunk)defmain():gh=Github()splitpolicies=gh.repos.octoenergy.terraform_provider_splitpolicies# Get Releases from https://github.com/octoenergy/terraform-provider-splitpolicies - by default# we convert underscores to dashes in pathsreleases=splitpolicies.releases.latest.get()# pretty print the JSON decoded responsereleases=splitpolicies.releases.latest.get(print_json=True)# Insert something into the URL that we can't type as a python variable namegh.a("some$endpoint").get()# Will raise an exception - this endpoint doesn't exist# The above is the same asgh.append("some$endpoint").get()# Won't work, but with clearer code# Avoid URL magic, just want the headers and response code checkinggh.get(url="https://github.com/octoenergy/terraform-provider-splitpolicies").get()
Package: almost-unique-id
almost-unique-idGet almost unique ID names. This package randomly selects anadjective-Namepair from 24,567,933 unique pairs.These IDs serve much the same pupose as generating a random hex string, that is to get random names for things that are (extrememly) unlikely to overlap. This project was developed alongside several scientific research projects where many trial of an experiment needed to be named distictly. We find that Enlglish languane keys are easier to discuss and remember than some number of digits/letters that might be unpronounceable.Feel free to use this for any such application. If you have a use for this that you think is worth mentioning in the README, feel free to open a PR and add it so the description.InstallationThis package is installable with pip:$ pip install almost-unique-idOr, you can install it from source by git cloning it and installing with pip as follows.$ git clone https://github.com/aks2203/almost-unique-id.git
$ cd almost-unique-id
$ pip install -e .Examplefrom almost_unique_id import generate_id

run_id = generate_id()Sources:The names and adjectives are copied from other sources. An effort was made to find a list without explicit content.The names are copied from thisfile.The adjectives are copied from thifile.Development and ContributionWe believe in open-source community driven software development. Please open issues and pull requests with any questions or improvements you have.
Package: alms
# ALMS - ALMS Library Management System#####[Currently Being Hosted At [Nepal Japan Children Library](https://www.facebook.com/Nepal-Japan-Children-Library-117390398337579), Lainchaur, Kathmandu]ALMS is a Django Based Library Management System###__What Can ALMS Do?__* Catalog Books* Manage Members, volunteers and librarians* Lend books, return books* Take care of your accounting journal, ledger and trial balances* Search For Books based on all their properties###__How To Install ALMS__To install on a debian system, run this :wget -qO- https://raw.githubusercontent.com/ayys/alms/master/install.sh | shThe above code will start the server and run it in the default browser.To start the server again, simply go to the `alms` directory and run start.sh###__Programmer's Documentation__ is on our [wiki page](https://github.com/ayys/alms/wiki)
Package: alnair
AlnairAlnair is a simple system configuration framework.
And also are intended to be used in conjunction with the Fabric (https://github.com/fabric/fabric).RequirementPython 2.6 and later (but does not work in 3.x)Installationfrom pypi:# using pip
% pip install -U alnair

# or using easy_install
% easy_install -U alnairfrom source:% python setup.py installBasic usageFirst, generate the recipes template set by following command:% alnair generate template archlinuxIn this example, distribution name usingarchlinux.recipes/archlinux/common.pydirectories and file are created to current directory by this command.
Also “g” as an alias for thegeneratecommand has been defined.
The following command is same meaning as above:% alnair g template archlinuxNext, editinstall_commandvariable incommon.pyfor the target distribution:# common.py
install_command = 'pacman -Sy'Next, generate recipe template for package setup by following command:% alnair g recipe pythonpython.pyfile is created onrecipes/archlinux/directory by this command.
In fact, directories where you want to create the files arerecipes/*/.Finally, editpython.pyfor more settings if necessary and setup to the server by following command:% alnair setup archlinux pythonUsing as a libraryYou can use the following code instead of “alnair setup archlinux python” command:from alnair import Distribution

distname = 'archlinux'
with Distribution(distname) as dist:
    dist.setup('python')For more documentation, read the sources or please wait while the document is being prepared.Changes0.3.2Add –dry-run option to CLIImplement the multiple packages in the single package nameImplement a host specific configuration0.3Add command-line interfaceAdd Distribution.config() API0.2Change the APIs (An incompatible with older releases)0.1.2Implement the commands execution to make before setupBug fixes0.1.1A few bug fixes0.1First release
Package: alnitak
This program is designed to help manageDANE (TLSA)records on a server usingLet’s Encryptcertificates. Specifically, if you are thinking of using DANE to secure a service encrypted with Let’s Encrypt certificates, you will at least need a reliable way to update your DNS TLSA records when your TLS certificates are renewed. This program can help you do this.Documentation is provided athttps://alnitak.readthedocs.io/en/latest/.StatusCode is in beta. Program is functional, but more testing is required.
If you wish to use the program, then you will likely find that the program
works, butmaybe temperamental to changes in your setup. Thus, it is
recommended that you check that everything works by forcing a certificate
renewal, if you can, and to also keep a check on automated renewals, if
error reporting mechanisms are not already in place.NoteThe code is being rewritten from scratch. Version 0.3 will add some
extra functionality and make some improvements (especially with regards
to the weaknesses of robustness of verion 0.2).LicenceMIT LicenseCopyright (c) 2019 K. S. KoonerPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: alnlp
ALNLPThis package repacks some sub-modules fromAllenNLPinto a seperate, lightweight package.alnlp=allennlp-len, which meansalnlpis a reduced-length version ofallennlp.Modification:allennlp.training.metricsrenamed toalnlp.metricsconditional_random_field.pymoved toalnlp.moduleschu_liu_edmonds.pymoved toalnlp.algorithmsUnrelated dependencies removedOther sub-modules are not includedThis package is provided "AS IS" without warranty of any kind. If you find any bugs, please try the originalAllenNLP, which is up-to-date and well maintained.LicenceThis package adopts the sameApache License 2.0from AllenNLP.All credit goes to AllenNLP team.
Package: alo
aloA tool to combine function with DAG.Documentation:https://alo.readthedocs.io.DevelopmentCreate a virtual environmentcondaenvcreate-fenvironment.ymlsourceactivatealoInstall dependenciesThere are two options:Use poetry:poetryinstallUse pip:pipinstall-e".[dev]"Update dependenciespoetryupdateBump versionbumpversionminor# major, minor, patchShow information about installed packagespoetryshowShow dependency treedephelldepstree# ordephelldepstreepytestInstall git pre-commit hookspre-commitinstallLicense© uchuhimo, 2019. Licensed under anApache 2.0license.
Package: aloe-django
[![Build status](https://img.shields.io/travis/aloetesting/aloe_django.svg)](https://travis-ci.org/aloetesting/aloe_django)
[![Coverage](https://img.shields.io/coveralls/aloetesting/aloe_django.svg)](https://coveralls.io/github/aloetesting/aloe_django)
[![PyPI](https://img.shields.io/pypi/v/aloe_django.svg)](https://pypi.python.org/pypi/aloe_django)Utilities for using [Aloe](https://github.com/aloetesting/aloe) with
[Django](http://djangoproject.com):Aharvestcommand to run Gherkin testsA collection of steps to aid in testing Django applicationsInstall:pip install aloe_djangoRead the [documentation](http://aloe.readthedocs.io/projects/aloe-django/).Aloe and Aloe-Django are based on [Lettuce](http://lettuce.it/).LicenseAloe-Django - Django utils for Aloe based on LettuceCopyright (C) <2015> Alexey Kotlyarov <a@koterpillar.com>Copyright (C) <2015> Danielle Madeley <danielle@madeley.id.au>Copyright (C) <2013-2014> Infoxchange <devs@ix.org.au>This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Package: aloe-webdriver
[![Build status](https://img.shields.io/travis/aloetesting/aloe_webdriver.svg)](https://travis-ci.org/aloetesting/aloe_webdriver)
[![Coverage](https://img.shields.io/coveralls/aloetesting/aloe_webdriver.svg)](https://coveralls.io/github/aloetesting/aloe_webdriver)
[![PyPI](https://img.shields.io/pypi/v/aloe_webdriver.svg)](https://pypi.python.org/pypi/aloe_webdriver)A set of [Gherkin][gherkin] steps for use with [Aloe][aloe] to test Web
applications using Selenium.Based on [lettuce_webdriver][lettuce_webdriver] which, in turn, is inspired by
[cucumber_watir][cucumber_watir].Install:pip install aloe_webdriverRead the [documentation][documentation].LicenseThe MIT License (MIT)Copyright (C) <2015> Alexey Kotlyarov <a@koterpillar.com>Copyright (C) <2015> Danielle Madeley <danielle@madeley.id.au>Copyright (C) <2013-2014> Infoxchange <devs@ix.org.au>Copyright (C) <2011> Ben Bangert and all contributors.Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.[aloe]:http://aloe.readthedocs.io/[cucumber_watir]:https://github.com/napcs/cucumber_watir[gherkin]:https://cucumber.io/[documentation]:http://aloe.readthedocs.io/projects/aloe-webdriver/[lettuce_webdriver]:https://github.com/bbangert/lettuce_webdriver
Package: alogator
Alogator is an aggregated logging actor system.Table of ContentsInstallationUsageTODOHistroyContributeInstallationTo get the latest stable release from PyPipipinstallalogatorTo get the latest commit from GitHubpipinstall-egit+git://github.com/arteria/alogator.git#egg=alogatorAddalogatorto yourINSTALLED_APPSand define a loggerINSTALLED_APPS=(...,'alogator',)LOGFILE_PATH=os.path.join(os.path.join(BASE_DIR,'logs/'),"alogator.log")LOGGING={'version':1,'disable_existing_loggers':False,'filters':{'require_debug_false':{'()':'django.utils.log.RequireDebugFalse'}},'formatters':{'standard':{'format':"[%(asctime)s]%(levelname)s[%(name)s:%(lineno)s]%(message)s",'datefmt':"%d/%b/%Y %H:%M:%S"},},'handlers':{'logfile':{'level':'DEBUG','class':'logging.handlers.RotatingFileHandler','filename':LOGFILE_PATH,'maxBytes':1000000,'backupCount':0,'formatter':'standard',}},'loggers':{'alogator':{'handlers':['logfile'],'level':'DEBUG',},}}Don’t forget to create the tables for your database./manage.pysyncdbalogator# python manage.py migrateUsageSetup your logfiles, search patterns and actors in the admin backend.To run one (scan all logfiles for patterns) just call thescanlogfilesmanagement command.pythonmanage.pyscanlogfilesYou can usealogator_clito check the log files in a project. Simple add paths to settings files as arguments. Be aware that you have to run the project, so you need to first activate your virtualenv if you have one.# if you have a virtualenv./path/to/env/bin/activatealogator_cli/path/to/project/settings.pyTo run this continously you could setup a cronjob. For example, to run this every other minute usecrontab-eThan add*/2****/path/to/your/manage.pyscanlogfilesYou may have to activate your virtualenv depending on your setup.TODOCustomizable temporary working dir instead of /tmpCustomizable subject, eg. [Alogator] (to filter inbox)Add “To mute this actor, visit…” in message/email.HistroyPlease refer to CHANGELOG.txtContributeIf you want to contribute to this project, simply send us a pull request. Thanks. :)
Package: alogging
Python logging tools and utils.UsageTo use alogging in a project:import aloggingExamplesBasic use of alogging:import alogging

# create a logging.Logger object, will use the __name__ of the
# module by default. Equilivent to 'log = logging.getLogger(__name__)'
log = alogging.get_logger()

log.debug('created a Logger object so use it for a debug msg')

if __name__ = '__main__':
    main_log = alogging.app_setup(name='example.main')
    main_log.debug('started main')More advanced:import alogging

# local alias for alogging.a()
a = alogging.a

log = alogging.get_logger()

class ThingToDo(object):
    def __init__(self, requirement, priority=None, assigner=None):
        # get a Logger named 'example.ThingToDo'
        self.log = alogging.get_class_logger(self)

        self.log.info('Task as assigned: req=%s, pri=%s, ass=%s', requirement, priority, assigner)

        priority = priority or 'never'

        self.log.info('Task reprioritized: req=%s, pri=%s, ass=%s', requirement, priority, assigner')


# alogging.t decorator will log when the decorated method is called,
# what args it was passed, and what it's return value was

@alogging.t
def space_out_for_while(duration=None):
    # space out for 10 minutes by default
    duration = duration or 600

    # return the total amount of work accomplished
    return 0

def find_coffee(coffee_places):
    log.debug('looking for coffee')
    return None

def do_startup_stuff():
    coffee_places = ['piehole', 'mug_on_desk', 'coffee_machine', 'krankies']
    # log the the args to find_coffee as it is called
    has_coffee = a(find_coffee(coffee_places))

    work_accomplished = space_out_for_while(duration=300)

def do_work():
    next_task = TaskToDo('finish TODO list', assigner='Lumberg')
    if not next_task:
        return

    # oh no, work...
    log.error("I'm slammed at the moment, I can't do %s', next_task)
    raise Exception()

if __name__ = '__main__':
    # use some reasonable defaults for setting up logging.
    # - log to stderr
    # - use a default format:
    #   """%(asctime)s,%(msecs)03d %(levelname)-0.1s %(name)s %(processName)s:%(process)d %(funcName)s:%(lineno)d - %(message)s"""
    main_log = alogging.app_setup(name='example.main')
    main_log.debug('Log to logging "example.main"')

    do_startup_stuff()

    try:
        do_work()
    except Exception as exc:
        # gruntle a bit and continue
        log.exception(exc)

    return 0LicenseFree software: MIT licenseFeaturesTODOAuthorsAdrian Likins
Package: aloisius
Aboutaloisius helps you to manage the life-cycle of AWS CloudFormation stacks. It
allows you to use outputs from one stack as input parameters to other stacks.
There are other tools which allow you to do so, like i.e. Cumulus or Ansible,
but I couldn’t find one which doesn’t require you to use YAML or Jinja2. It
is a pure Python library and it is intended to be used in inter-play with
troposphere, but you can also use it with any CloudFormation JSON templates.LicenseThe BSD 2-Clause License:http://opensource.org/licenses/BSD-2-ClauseInstallationaloisius can be installed using the pip distribution system for Python by
issuing:$ pip install aloisiusAlternatively, you can run use setup.py to install by cloning this repository
and issuing:# python setup.py installExamplesA simple example creating a VPC containing an RDS could look like this:#!/usr/bin/env python

from aloisius import Stack
import boto3

# I keep my troposphere templates as modules in a package.
from templates.vpc import template as template_vpc
from templates.rds import template as template_rds

# You can set your own boto3 session and override the default. E.g:
# aloisius.session = boto3.session.Session(profile_name: "PROFILE")

# I normally put some constants and helper functions here.
app_name = 'myapp'
region_name = 'eu-central-1'
stack_name = lambda x: '-'.join([app_name, region_name, x])

vpc = Stack(
    StackName=stack_name('vpc'),
    TargetState='present',
    RegionName=region_name,
    TemplateBody=template_vpc.to_json(),
)

rds = Stack(
    StackName=stack_name('rds'),
    TargetState='present',
    RegionName=region_name,
    TemplateBody=template_rds.to_json(),
    Parameters={
        # You can use outputs of previously created stacks as parameters.
        'VpcId': vpc.outputs['VpcId'],
        'PrivateSubnets': vpc.outputs['PrivateSubnets'],
        # More parameters here.
    },
)

# You can wait for all of the stacks to finish

aloisius.stacks.wait()

# Or you can check if they were all applied successfuly

if not aloisius.stacks.success():
  exit(1)

# Or you can iterate over their outputs

for stack in aloisius.stacks:
  for key, value in stack.outputs.items():
    print "{0}={1}".format(key, value)Why you shouldn’t use aloisiusThere’s not much documentation (but there are comments in the code).Why you should use aloisiusYou could find some bugs and help to make it better.Parallel stack creation/deletion.Integrates nicely with troposphere: No JSON and no YAML.
Package: alotofeffort
Instantly deploy static HTML sites to S3 at the command line.I created this out of frustration, after spending a lot of effort trying to
find a PyPI package that did this without problems.DocumentationThe full documentation is athttp://alotofeffort.rtfd.org.QuickstartInstall it:pip install alotofeffortConfigure Boto the standard way in~/.boto:[Credentials]
aws_access_key_id = ...
aws_secret_access_key = ...Then use it to deploy a static HTML website to an S3 bucket:$ alotofeffort www/ mybucketFeaturesUses standard Boto configuration.Prints the S3 endpoint URL after deploying.Auto-configures the bucket to be a website, with all files public.Only files that have changed get uploaded. Files are checked for changes by
comparing the local and remote MD5 hashes of the files.Never auto-deletes. In fact, it doesn’t delete files at all! (In the future,
it will check if any files need to be deleted from S3, and prompt you before
deleting anything.)History0.4.0 (2015-09-15)Upgraded boto to 2.38.0.Added tox envs for Python 3.3, 3.4, 3.5.PEP 8 cleanup.README cleanup.Improvements to setup.py.0.3 (2013-07-27)Only files that have changed get uploaded. Files are checked for changes by
comparing the local and remote MD5 hashes of the files.0.2 (2013-07-17)It works on Python 2.6 and 2.7.0.1 (2013-07-14)First release on PyPI.
Package: alot-plugin-checkmail
checkmail plugin for alotA plugin that checks mail asynchronously, giving you feedback through the process via notifications.This plugin was mostly written to accomodate runningmbsyncfrom insidealotwithout being intrusive. This can be useful if you do not wish to wait for your systemd timer to execute your mail sync.InstallationRun the following in the environment that alot'shooks.pyuses:pipinstall--upgradealot-plugin-checkmailYou may need to usesudoif your Python installation is owned byroot.ConfigurationInsert the following stanza in your~/.config/alot/configfile:[checkmail]command='/path/to/your/binary/or/script -abc --with --any --parameters'UsageThe easiest way to include your plugin is to import it directly in the top ofhooks.pylike so:fromalot_checkmailimportcheckmailYou can then invoke the command in alot by running:checkmail.
Package: al-otto
ottoan ottomatic video creatorInstall from pippipinstallal-ottoOptional packagesOtto ships with several optional packages, which can be installed withpiporpdmpip installpipinstallal-otto[test]local pip installpipinstall.[test]pdmpdminstall-GtestDevelopmentInstall pdmpipinstallpdmClone the repositorygitclonehttps://github.com/quaternionmedia/otto.gitcd into the repocdottoInstall the development dependenciespdminstallCreate a local virtual environmentpdmvenvcreateActivate your local virtual environmenteval$(pdmvenvactivate)Or...source.venv/bin/activateDeactivate your virtual environment by runningdeactivatetestInlcudes pytest and other testing dependencies. Run with:pytestCan also be run with VSCode Python test extension, or VSCode debugger.renderIncludes the python dependencies needed for rendering and effects.NOTERequires a working installation ofimagemagickdocsIncludes documentation building tool. Run with:mkdocsserve-a0.0.0.0:9000Then visitlocalhost:9000noxRunning all tests and formatters can be done as a one-liner usingnoxpipinstallnoxThen run:noxSessionsTo run a single session, i.e. just the test suite, run:nox-scoverageSeenoxfile.pyfor other commands.CreditsCreated byQuaternion Media, LLC