Saravanan666/pypi-org huggingface dataset:
Package: mamushi
MamushiMamushi is a fork of the popularBlackformatter adapted to theVyperprogramming language. Mamushi reformats your Vyper contracts in a readable and consistent way.Installationpip install mamushiUsageSearch all *.vy files and overwrite them after formatting:mamushiSpecify a list of *.vy files or directories and output to console after formatting:mamushi [SRC]Output the result to console instead of overwriting:mamushi --in-place FalseNotesLine lengthThe default line length is 80. Line length can be adjusted by using the--line-lengthoption.AST SafetyBy default, mamushi will compare the AST of your reformatted code with that of the original to ensure that the changes applied remain strictly formal. The option can be disabled with--safe Falseto speed things up.Trailing commasWhen handling expressions split by commas, mamushi follows Black'sdefault behavior.Mamushi also uses Black'smagic trailing commato give user the option to collapse a comma-separated expression into one line if possible. If a trailing comma is added, mamushi will always explode the expression. This can have important consequences for the commenting of your code. Consider the following two examples:This code snippet:self.b(0, # amount to send
       msg.sender, # sender
       True, # refund ?
        )formats to the following with a trailing comma after the last argument (True):self.b(
    0,  # amount to send
    msg.sender,  # sender
    True,  # refund ?
)but if the trailing comma is removed, the line will be collapsed to:self.b(0, msg.sender, True)  # amount to send  # sender  # refund ?Future developmentsMultiprocessing when processing multiple filesConfiguration filesImprove Windows compatibilityHandle versioning of Vyper/lark grammarRefactoring comment handling in the parserAdd .gitignore / exclude / include support
Package: man
manmanis a software distribution tool that works over setuptools and
help integerate PyPi, Travis, Github and You together. This lets you
create a python library and have it deployed in less than ten minutes.Getting startedCreationSay that you have an idea of a new library that you would like to share
with other on PyPi. You know python, you use github and you don’t want
to spend hours struggling in the mess of package distribution.Thus, just installman:pip install manNOTE: If you are on windows, you will need to installpyreadlinewithpip install pyreadline.And create a new library:man new-libThen answer the short questions about your library:Name of your library:
Short description:
Keywords (space separated):
Full name:
E-Mail:
Github username:
PyPi username:If you don’t already have a PyPi account, you need tocreate
one.Then you will be prompted for your github password to create a new
repository with the name of your lib.Then you just need to: - Setup Travis: -create an
account- Find your repo athttps://travis-ci.org/profile/YOURNAMEand turn the switch on. - Add
your travis password to the .travis.yml: - Openbash- And just runtravis encrypt--adddeploy.password- And type your travis password
- Add classifiers (or tags) for your library so people can find it more
easily, runman add tag- Write your code, do commits, tests and
whatever you want. - Complete the readme.md (not the readme.rst, because
it is always converted from the readme.md.)First releaseNow the version of your code is0.0.0. I choose to use the simpleMAJOR.MINOR.PATCHsystem as it’s easy to use, understand and work
with.When you are ready for your first release, typeman release majorEnter a description of your first release (it can be more than one line)
and confirm that you want to create a new release. Your code is then
taged withv1.0.0, and that will trigger a Travis build and
deployment on PyPi. You can go ontravis-ci.organd when everything is
finished, type:pip install my-new-libAnd that’s it!And afterThen, everytime you add functionalities or correct bugs and you want to
share them just type one of the following:man release patch  # When you just fix broken things
man release minor  # when you add functionnality
man release major  # when you do big changes (maybe not backward compatible)All commands are well described, so try to run them with the--helpflag to see whatmancan do.List of commands:Id there is a tilde (~) after a command, there is an interactive
prompt disponible, with autocompletion.man-add-keywords [KW1] [KW2] ...-package [PATH_TO_PKG]-dependancy [LIBRARY] [VERSION]~ -script~ -tag~ -remove-keywords~ -package [PKG_NAME]~ -dependancy [LIBRARY]~ -script [NAME]~ -tag~ -release [major|minor|patch]---test---again-new [DESTINATION_DIR]~ -changelog--v/--verbose-config~ - See thepyconfiglibreference. -gen-readme.rst-setup.py-MANIFEST.inBy Diego Dorn
Package: managealooma
Manage AloomaManage Alooma provides code used to programmatically manage the Alooma ETL tool via its API and generic transformation code for manipulating data.Full DocsDocs:http://managealooma.readthedocs.org/Source:https://github.com/hoverinc/managealoomaDownload:http://pypi.python.org/pypi/managealoomaAbout AloomaAlooma is an ETL tool for building out datawarehouses. Alooma does the basic tasks of connecting to sources for you such
as replicating a database, receiving a webhook or  connecting to a cloud app API. Alooma also inserts your data to a
datawarehouse such as Snowflake, Redshift, or Bigquery.  In between those steps Alooma allows you to transform your
data any way you want using real Python code.  This package contains may functions to make programmatic management of
Alooma easy!
Package: manageconf
Manage ConfDescriptionBuilds a config object based on environment variables, settings files and (optional) parameters stored in AWS System Manager Parameter Store.The config object merges in config, overriding any previous key/value pairs, in the following order:ENVdefault config: default.jsonstage config: {stage}.jsonremote config: remote_settings (AWS param store)Available to download as a package onPyPi.Settings FilesSet an environment variable with the key nameproject_config_dir. It is important this is set before the package is imported. The value ofproject_config_dirshould be the location of your/settingsfolder.Set-up your settings folder, adding in configuration to the appropriate file..
├──settings<--Settingsfolder
│├──default.json<--defaultconfiguration
│├──{stage}.json<--stagespecificconfiguratione.g.`local`│└──{stage}.json<--stagespecificconfiguratione.g.`dev`Example configuration:default.json{"project_name":"example-project","DEBUG":false}local.json{"DEBUG":true,"use_remote_settings":false}Local config object:{"project_name":"example-project","DEBUG":True,"use_remote_settings":False}dev.json{"use_remote_settings":true}Dev config object:{"project_name":"example-project","DEBUG":True,"use_remote_settings":True# and any remote settings from AWS param store}AWS Param StoreProject configAdd parameters in your AWS account with paths that match this pattern:/{project_name}/{stage}/If you set"use_remote_settings": truein a remote{stage}.jsonconfig file, the package will attempt to fetch the parameters from the store that have the specified base path. Using the example configuration above, the path would be:/example-project/dev/Global service directory configAdd parameters in your AWS account with paths that match this pattern:/global/{stage}/service_directory/Set"global_service_directory": truein a remote{stage}.jsonconfig file.Global service directory config for the{stage}will be merged in.UsageMake sureproject_config_diris set before importing the library.frommanageconfimportConfig,get_configSECRET_KEY=get_config("SECRET_KEY")DEBUG=get_config("DEBUG",True)# default values are an optional second arg and will# be used if the param cannot be found in the config objectDevelopmentInstallRequiresPoetry.# create a Python3 virtual environmentvirtualenv-ppython3env# activate the virtual envsourceenv/bin/activate# install requirementspoetryinstallTests# run testspytest-vv# coverage report in the Terminalpytest--cov=manageconftests/# coverage report in HTMLpytest--cov-reporthtml--cov=manageconftests/
Package: manageconfig
config managerInstallation:pip install manageconfigThis library manages config files and exposes them as Python objects. It is super small, basic, and easy to use.Note:This package currently supports only YAML and JSON configurations, but we will soon add support for other formats (and we are open to suggestions).Example:Suppose we want to load theconfig.pyfile attached below. We can do it as follows:frommanageconfigimportConfigconf=Config.load_from_yml('config.yml')print(conf.string2)print(conf.string1)# This will print 'localhost'print(conf.mysqldatabase.hostname)# i == 3013i=conf.mysqldatabase.port+1# comment syntax

# basic syntax - key and value separated by colon and space before the value
key: value

# Scalar data types
integerValue: 1                     # integer value
floatingValue: 1                     # floating vale

stringValue: "456"                   # string with double quotes
stringValue: 'abc'                  # string with single quotes
stringValue: wer                   # string without quotes

booleanValue: true                   # boolean values - true or false


# Multiline string with literal block syntax -preserved new lines
string1: |
  Line1
  line2
  "line3"
  line4

# Multiline strings with folded block syntax - new lines are not preserved, 
# leading and trailing spaces are ignore
string2: >
  Line1
  line2
  "line3"
  line4
# Collection sequence data types
# sequence arraylist example
arraylist:
  - One
  - two
  - Three

arraylist2: [one, two , three]

mysqldatabase:
  hostname: localhost
  port: 3012
  username: root
  password: rootJSON support:In order to use json format - simply useConfig.load_from_json('config.json')
Package: manage-crystal
manage_crystalA tool to convert crystal files (atoms coordinates + unit cell) into common files and extract some useful infoInstallation:pip install manage_crystalUsage:to get default info about the crystal:$ manage_crystal.py inputfilename.inputformat [options]`to convert to another format:$ manage_crystal.py inputfilename.inputformat [options] -o outputfilename.outputformator$ manage_crystal.py inputfilename.inputformat [options] -o outputformatto get help and explore the functionalities:$ manage_crystal.py --helpto convert files inside a python script:from manage_crystal.utils import parse_and_write
parse_and_write(inputfile, outputfile)Tips:you may want to use-silentto suppress default verbose output: several options "skip -silent" so that you can print just that information on the screen (e.g.,-printatoms -silentprints on the screen just the atom types on one line). This make easy to use bash loops for lists of structures.DevelopmentInstall manage_crystal in editable mode, and enable automatic code formatting for every commit:git clone https://github.com/danieleongari/manage_crystal.git
cd manage_crystal
pip install -e .\[pre-commit\]
pre-commit install
Package: managedtenants-cli
# Managed Tenants CLIA CLI tool commonly used by MT-SRE projects at Red Hat.## Usage### Available subcommandsSubcommand       | Description                                                                        |—————- | ———————————————————————————- |load| Loads the addons inventory                                                         |run| Runs the task                                                                      |tasks_reference| [path:search] “path” for the directory or file and “search” string to filter tasks |### Available flagsFlag                 | Description                            |——————– | ————————————– |-vor–version| CLI version                            |–environment| Target environment                     |–addon-name| Load only a given addon                |–addons-dir| [path] “path” for the addons directory |–ocm-api| Override the environments in OCM API   |–ocm-api-insecure| Allow Insecure connections to OCM API  |## InstallFrom PyPI:`bash $ pip install managedtenants_cli `From source:`bash $ python setup.py install `## DevelopInstallpre-commithooks:`bash $pre-commitinstall `Install the development requirements:`bash $ make develop `Run the code checks:`bash $ make check `Run the tests:`bash $ make test `## ReleaseUpdate the VERSION file to reflect the new version. Submit a pull request and merge it to main. Once it is merged, you need to create a new tag and a new release. You can do this by clicking “Draft a new release” on the Releases page and then creating a new tag instead of selecting one from the dropdown. Please also use the option to “Generate release notes”. After that, a CI job will be triggered that will publish the package on PyPI.Alternatively, you can create a new tag by running:` git checkout main && git pull upstream main git tag X.Y.Z git push upstream X.Y.Z `and then draft the release in the web UI.## LicenseThe default license of the code in this repository is [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). That applies for most of the code here, as they were written from scratch, but exceptions exist. In any case, each module carries the corresponding licensing information.
Package: manage-fastapi
manage-fastapimanage-fastapiProject generator and manager for FastAPISource Code: View it onGithubFeatures 🚀Creates customizableproject boilerplate.Creates customizableapp boilerplate.Handles the project structuring for you.Optional Dockerfile generation.Optional docker-compose generation for your project needs.Optional pre-commit hook generation.Installation 📌PrerequisitesPython 3.6 +Manage FastAPI can be installed by runningpipinstallmanage-fastapiGetting started 🎈Easiest way to start is using the defaults:fastapistartproject[name]But there is aninteractivemode!fastapistartproject[name]--interactiveCommand line options 🧰Manage FastAPI provides three different commands.You can list them withfastapi--helpThe idea is to have a highly customizable CLI, but at the same time a simple interface for new users. You can see the available options forstartprojectrunningfastapi startproject --help:The other commands are already available but the current implementation is too shallow. More details aboutstartappandruncommands will be provided once they have more functionalities, at the moment you can runstartappby just:fastapistartapp{name}On the other hand, theruncommand expects you to have astartprojectstructure:fastapirunLicenseThis project is licensed under the terms of the MIT license.
Package: manage-fields
Manage fieldsUsageviews.pyfrom manage_fields.mixins import MFViewMixinclass MyView(MFViewMixin, ...):serializer_class = MySerializer....serializers.pyfrom manage_fields.mixins import MFSerializerMixinclass MySerializer(MFSerializerMixin, ...):...Requesthttps://abcd.com/?allow_fields={id,name}Paramsallow_fields- Fields returned in responsedisallow_fields- Fields that are not returned in the responseExamplemodels.pyclass Example(models.Model):field1 = models.CharField(max_length=50)field2 = models.TextField()field3 = models.IntegerField()Requesthttps://example.com/?allow_fields={id,field1}Response[{"id":1,"field1":"Field1 value 1"},{"id":2,"field1":"Field1 value 2"}]Requesthttps://example.com/?disallow_fields={id,field1}Response[{"field2":"Field2 value 1","field3":"Field3 value 1"},{"field2":"Field2 value 2","field3":"Field3 value 2"}]Also you can use this package forCreateAPIView,UpdateAPIView,RetrieveAPIView
Package: management-api-tools
Management API ToolsThis toolkit arose from the need to ensure a consistent state of policies during the 2020 Ionic Hackathon. It has since
evolved and now supports theData PoliciesandMetricsManagement API's.This software is not officially supported by Ionic Security, Inc.FeaturesAuthenticate to Machina using a simple interface for basic, bearer, and HMAC authentication methods.List, create, update, backup, and delete data policies programmatically.Retrieve metrics activity for various request types.UsageInstall management_api_tools (requires Python 3.7+):python-mpipinstallmanagement_api_toolsTo preserve the current configuration of data policies prior to the execution of a demo,backup_policies.pycan create a backup of all data policies programmatically.Alternatively, it is possible to export data policies manually:Login to the Machina ConsoleGo to the Data Policies tabFilter the data policies, if necessaryClick Export on the top rightDownload the fileWith the exported policies saved locally, you can use management_api_tools to enforce your desired state:frompathlibimportPathfrommanagement_api_toolsimportMachinadeffirst_policy_demo():""" Ensure the desired state exists for the first demo. """# Modify the path to point to the location of the JSON file.document=Path.cwd().joinpath('data-policies.json')policy_document=document.read_text(encoding='utf-8-sig')api=Machina(instance_id='INSTANCE_ID')api.hmac_authentication(identity='HMAC_IDENTITY',secret='HMAC_SECRET')# merge='replace' will delete all other data policies that do not exist in the JSON file.returnapi.create_update_multiple_policies(policy_document=policy_document,merge='replace')defsecond_policy_demo():""" Ensure the desired state exists for the second demo. """...desired_state=first_policy_demo()print(desired_state.ok)Additional examples can be found inpolicies_client.py.Local Development and TestingDevelopmentDevelopment and testing should be done in a virtual environment.$gitclonehttps://github.com/Fauxsys/management_api_tools.git
$cdmanagement_api_tools
$python-mvenvvenv--promptmanagement_api_tools
$sourcevenv/bin/activate(management_api_tools)$python-mpipinstall-UpipInstall management_api_tools locally.(management_api_tools)$python-mpipinstall-e".[test]"TestingReview thedesign documentto understand the test runner implementation.You can test any changes locally with pytest.(management_api_tools)$python-mpytest--cov=management_api_toolsYou can also test management_api_tools as an installed package.(management_api_tools)$python-mtoxBuilding a wheel(management_api_tools)$python-mpipinstallbuild(management_api_tools)$python-mbuild--wheelThere should now be a wheel in thedistdirectory.(management_api_tools)$ls-1dist
management_api_tools-1.0.0-py3-none-any.whl
Package: manage.py
Human friendly CLI builder.Installationpip install manage.pyQuickstartcat manage.pyfrommanagerimportManagermanager=Manager()@manager.commanddefecho(text,capitalyze=False):"""print the given <name>"""ifcapitalyze:text=text.upper()returntextif__name__=='__main__':manager.main()manage--help:usage: manage [<namespace>.]<command> [<args>]

positional arguments:
  command     the command to run

optional arguments:
  -h, --help  show this help message and exit

available commands:
  echo        print the given <name>manage echo--help:$ manage echo --help

usage: manage [-h] [--capitalyze] text

print the given <name>

positional arguments:
  text          no description

optional arguments:
  -h, --help    show this help message and exit
  --capitalyze  no descriptionManagersManagers can be used together by merging themfromthird_partyimportmanagermy_app_manager.merge(manager)# Merge within a new namespace:my_app_manager.merge(manager,namespace='third_party')CommandsCommands can be organized within namespaces@manager.command(namespace='config')defset(key,value):# ...ArgumentsCurrently the framework will assume that arguments with default values are
key-value arguments (--argvalue) while required arguments are positional
ones.In other words, this definition:@manager.commanddefcreate(user):passwill expect an invocation of the kind:$ manage create foobaranduserincreate()will take the value'foobar'.On the other hand, this:@manager.commanddefcreate(user=''):passwill expect an invocation of the kind:$ manage create --user foobarThe downside is obviously that it’s not currently possible to have a required
non-positional argument.Argument definition can be overridden@manager.arg('first_arg',help='this is help for first arg')@manager.commanddefmy_command(first_arg):# ...Arguments can be prompted@manager.prompt('password',hidden=True,confirm=True)@manager.commanddefconnect(username,password):# ...EnvironmentEnvironment variables can be sourced from a.envfile askey=valuepair.Environment variable can be enforce usingManager.envdecorator@manager.env('MY_ENV_VAR')@manager.commanddefmy_command():returnos.environ['MY_ENV_VAR']
Package: manageritm
manageritmManage a mitmproxy service on another system over a RESTful APIGetting StartedInstall manageritm.pipinstallmanageritmgunicornStart manageritm server on port 8000.gunicorn--bind0.0.0.0:8000--workers1--log-leveldebug"manageritm.app:main()"In Python, create a client, start the mitmproxy service, stop the mitmproxy serviceimportmanageritmmanageritm_addr="localhost"manageritm_port="8000"# create a manageritm clientmc=manageritm.client.ManagerITMProxyClient(f'http://{manageritm_addr}:{manageritm_port}')proxy_details=mc.client()print(f"proxy port:{proxy_details['port']}")print(f"proxy webport:{proxy_details['webport']}")# start a proxy servermc.start()# set your application to use the proxy#  host: "localhost"#  port: f"{proxy_details['port']}"# do some work...# stop the proxy servermc.stop()Or start a video clientCreate a custom configuration file namedflask_config_video.pyMANAGERITM_CLIENT_COMMAND=['/opt/bin/video.sh']Start manageritm server on port 8000.gunicorn--bind0.0.0.0:8000--workers1--log-leveldebug"manageritm.app:main()"In Python, create a client, start the ffmpeg service, stop the ffmpeg serviceimportmanageritmmanageritm_addr="localhost"manageritm_port="8000"# create a manageritm clientmc=manageritm.client.ManagerITMCommandClient(f'http://{manageritm_addr}:{manageritm_port}')client_details=mc.client(additional_env={'DISPLAY_CONTAINER_NAME':'hanet_chrome_1','DISPLAY_NUM':'99','SE_VIDEO_FOLDER':'/videos','FILE_NAME':'blahh.mp4'})# start a proxy servermc.start()# recording should happening# ...# stop the proxy servermc.stop()Local DevelopmentCheck out this repositoryCreate a virtual environmentmakepyenvInstall Python dependenciesmakeinstallStart the servermakeserverStart a client, in a Python interpreter:importmanageritmmanageritm_addr="localhost"manageritm_port="8000"# create a manageritm clientmc=manageritm.client.ManagerITMProxyClient(f'http://{manageritm_addr}:{manageritm_port}')proxy_details=mc.client()print(f"proxy port:{proxy_details['port']}")print(f"proxy webport:{proxy_details['webport']}")# start a proxy servermc.start()Navigate a web browser tohttp://localhost:<proxy webport>to watch the trafficConfigure a web browser to use the proxy port.Stop the client# stop the proxy servermc.stop()Helpful CommandsTo build a package for the development version:makeallTo install a copy into your local python virtualenvmakeinstallTo run the test cases:maketestTo run the development version of the service:makerun