Saravanan666/pypi-org huggingface dataset:
Package: nginxauthdaemon
Authentication daemon for nginx-proxied or nginx-served applications.Installation and ConfigurationCreate virtual environment for the daemonvirtualenv envActivate it using. ./env/bin/activateInstall nginxauthdaemon from pypipip install nginxauthdaemonCreate config file overriding default values, see [Daemon configuration].NB!You need to override defaultSESSION_SALT,DES_IVandDES_KEYfor security.Setup env variableDAEMON_SETTINGSpointing to your config file.Run daemon with your favorite WSGI server, for exgunicorn nginxauthdaemon:app.Update nginx.conf. See [NGINX Configuration].Reload nginx (nginx-treload).Test your setup.Daemon configurationBasic configuration properties are:OptionDescriptionREALM_NAMERealm name shown on login pageSESSION_COOKIESession cookie name. Typically you do not need to change this.TARGET_HEADERHeader used to pass protected URL from NGINXSESSION_SALTLong string used a salt for creation of session key.DES_IV8byte initial vector for DES algorithmDES_KEY8byte DES encryption keyAUTHENTICATORAuthenticator class name, by default ‘auth.DummyAuthenticator’Authenticators available out-of-the-box:Authenticator nameDescriptionnginxauthdaemon.auth.DummyAuthenticatorSimplest authenticator checking username equals passwordnginxauthdaemon.crowdauth.CrowdAuthenticatorAtlassian Crowd based authenticatorCrowd authenticator has additional options:OptionDescriptionCROWD_URLCrowd server URL, for exhttp://localhost:8095/crowd/CROWD_APP_NAMECrowd application nameCROWD_APP_PASSWORDCrowd application passwordNGINX ConfigurationYour NGINX should be compiled withngx_http_auth_request_module. Please check it usingnginx-Vcommand.Example configuration:upstream auth-backend {
    server 127.0.0.1:5000;
}

location = /auth/validate {
    internal;
    proxy_pass http://auth-backend;

    proxy_pass_request_body off;
    proxy_set_header Content-Length "";
}

location = /auth/login {
    proxy_pass http://auth-backend;
    proxy_set_header X-Target $request_uri;
}

# Protected application
location / {
    auth_request /auth/validate;

    # redirect 401 and 403 to login form
    error_page 401 403 =200 /auth/login;
}LimitationsDaemon can be extended to support LDAP or any other auth method, but it support only Atlassian Crowd for now. I’ll be happy to merge PRs with new auth methods.LicenseThe reference implementation is subject to MIT License.
Package: nginxcsp
NGINX Content-Security-Policy header generatorThis tool will generateContent-Security-Policyheaders for a NGINX configuration file from import domains in HTML files.UsageTo generateContent-Security-Policyheaders from HTML files in a path you can use the following command:nginxcsp /path/to/html/files --out /path/to/nginx.conf --overridethe command will generateContent-Security-Policy,X-Content-Security-PolicyandX-WebKit-CSPheaders for allserverblocks of yournginx.conffile and remove the past ones. The headers will be generate from the tags in your html files, for example if you have an HTML file with the tag<script src="https://cdnjs.cloudflare.com/some-script.js"></script>you would get the headerContent-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdnjs.cloudfare.com; img-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; object-src 'self'".If you would like to create only theContent-Security-Policyheader you can use the flag--csp, the same applies forX-Content-Security-Policywith--xcspand forX-WebKit-CSPwith--xwebkit.You can get all the usage help usingnginxcsp -h:usage: nginxcsp html_path

Search content loading sources in HTML files and Content-Security-Policy
headers automatically.

positional arguments:
  html_path             the path of the HTML files

optional arguments:
  -h, --help            show this help message and exit
  --out OUT             NGINX configuration file to output the generated
                        headers
  --server_name SERVER_NAME
                        the server_name in the NGINX server block to add CSP
                        headers
  --port PORT           the port from "listen {port}" line in a NGINX server
                        block to add CSP headers
  --override            flag to override the headers in the out file
  --csp                 flag to generate only the Content-Security-Policy
                        header
  --xcsp                flag to generate only the X-Content-Security-Policy
                        header
  --xwebkit             flag to generate only the X-WebKit-CSP header
Package: nginxctl
<h1>NginxCtl</h1>This is a simple tool to manage nginx service on a server. This tool is similar to apachectl but for nginx. The important feature of this tool is ability to list vhosts configured on a nginx server.<h2>Download/Installation</h2>```wget https://raw.githubusercontent.com/fooltruth/nginxctl/master/nginxCtl.py  -O nginxctl.pypython nginxctl.py -S```<h2>Usage</h2>```python nginxctl.py -hUsage: nginxctl.py [options]Options:-S list nginx vhosts-t configuration test-k start|stop|status|restart|fullstatus-v version-h help```Here is an example of running the option to discover virtual hosts```# python nginxctl.py -Snginx vhost configuration:*:80; is a Virtualhostport 80;  localhost  (/etc/nginx/sites-enabled/default:28)alias   example.comnginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successful```
Package: nginxfmt
nginxconfig file formatter/beautifiernginxconfig file formatter/beautifier written in Python with no additional dependencies. It can be used as library or standalone script. It formatsnginxconfiguration files in consistent way, described below:All lines are indented in uniform manner, with 4 spaces per level. Number of spaces is customizable.Neighbouring empty lines are collapsed to at most two empty lines.Curly braces placement follows Java convention.Whitespaces are collapsed, except in comments and quotation marks.InstallationPython 3.4 or later is needed to run this program. The easiest way is to download package from PyPI:pip3installnginxfmtManual installationThe simplest form of installation would be copyingnginxfmt.pyto
your scripts directory. It has no 3-rd party dependencies.You can also clone the repository and symlink the executable:cd
git clone https://github.com/slomkowski/nginx-config-formatter.git
ln -s ~/nginx-config-formatter/nginxfmt.py ~/bin/nginxfmt.pyUsage as standalone scriptIt can format one or several files. Result is by default saved to the original file, but can be redirected tostdout.
It can also function in piping mode, with--pipeswitch.usage: nginxfmt.py [-h] [-v] [-] [-p | -b] [-i INDENT] [config_files ...]

Formats nginx configuration files in consistent way.

positional arguments:
  config_files          configuration files to format

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         show formatted file names
  -, --pipe             reads content from standard input, prints result to stdout
  -p, --print-result    prints result to stdout, original file is not changed
  -b, --backup-original
                        backup original config file as filename.conf~

formatting options:
  -i INDENT, --indent INDENT
                        specify number of spaces for indentationUsing as libraryMain logic is withinFormatterclass, which can be used in 3rd-party code.importnginxfmt# initializing with standard FormatterOptionsf=nginxfmt.Formatter()# format from stringformatted_text=f.format_string(unformatted_text)# format file and save result to the same filef.format_file(unformatted_file_path)# format file and save result to the same file, original unformatted content is backed upf.format_file(unformatted_file_path,backup_path)Customizing formatting options:importnginxfmtfo=nginxfmt.FormatterOptions()fo.indentation=2# 2 spaces instead of default 4# initializing with standard FormatterOptionsf=nginxfmt.Formatter(fo)Reporting bugsPlease create issue underhttps://github.com/slomkowski/nginx-config-formatter/issues. Be sure to add config snippets to
reproduce the issue, preferably:snippet do be formattedactual result with invalid formattingdesired resultCreditsCopyright 2021 Michał Słomkowski. License: Apache 2.0. Previously published underhttps://github.com/1connect/nginx-config-formatter.
Package: nginx-generator
nginx-generatorCommand line interface for generating nginx config filesFeaturesReverse proxy supportStatic file supportPhp supportCertbot supportUsageUsage: app.py [OPTIONS] DOMAIN

  Generate a nginx config file

Options:
  -p, --proxy TEXT       Proxy address
  -r, --root PATH        Document root
  --php                  Enables php-fpm
  --php-version TEXT     Set php-fpm version
  --filename TEXT        Set config filename (default: domain)
  --no-ssl               Disables automatic certificate using certbot
  --edit                 Open editor after install
  -y, --yes              Do not prompt user
  --dry-run              Writes to temporary file (implies --edit, --no-ssl)
  --ignore-nginx-errors  Don't exit on nginx errors
  --help                 Show this message and exit.Examplessudo nginx-generator example.com,www.example.com --root /var/www/html
sudo nginx-generator example.com,www.example.com --proxy http://localhost:8080/
sudo nginx-generator example.com --root /var/www/html --php --php-version 8.0Installationsudo pip3 install nginx-generatorIf you want to get ssl certificates, you need to installcertbot, and for php you requirephp-fpm
Package: nginx-language-server
Nginx Language ServerALanguage Serverfornginx.conf.Still under construction, expect big / potentially breaking changes for a while.Capabilitiesnginx-language-server currently partially supports the following Language Server capabilities with more to be added in the future.Language FeaturestextDocument/completiontextDocument/hoverInstallationFrom your command line (bash / zsh), run:pipinstall-Unginx-language-server-Uensures that you're pulling the latest version from pypi.Alternatively, consider usingpipxto keep nginx-language-server isolated from your other Python dependencies.Editor SetupThe following instructions show how to use nginx-language-server with your development tooling. The instructions assume you have already installed nginx-language-server.Vim / NeovimWithcoc.nvim, put the following incoc-settings.json:{"languageserver":{"nginx-language-server":{"command":"nginx-language-server","filetypes":["nginx"],"rootPatterns":["nginx.conf",".git"]}}}In your vimrc, I recommend putting in the following lines to ensure variables complete / hover correctly:augroup custom_nginx
  autocmd!autocmdFileTypenginxsetlocaliskeyword+=$
  autocmdFileTypenginxletb:coc_additional_keywords=['$']
augroupendAlternatively, you can usecoc-nginx.letg:coc_global_extensions=['@yaegassy/coc-nginx']Note: this list is non-exhaustive. If you know of a great choice not included in this list, please submit a PR!Command linenginx-language-server can be run directly from the command line.$nginx-language-server--helpusage: nginx-language-server [-h] [--version] [--tcp] [--host HOST][--port PORT] [--log-file LOG_FILE] [-v]Nginx language server: an LSP server for nginx.conf.optional arguments:-h, --help           show this help message and exit--version            display version information and exit--tcp                use TCP server instead of stdio--host HOST          host for TCP server (default 127.0.0.1)--port PORT          port for TCP server (default 2088)--log-file LOG_FILE  redirect logs to the given file instead of writing tostderr-v, --verbose        increase verbosity of log outputExamples:Run from stdio: nginx-language-serverInspirationThe useful language data for nginx is ported fromvscode-nginx-conf-hint. I would have used this library directly, but alas! It's written only for VSCode and I use Neovim.Written bySamuel Roecasamuel.roeca@gmail.com
Package: nginx-ldap-auth-service
nginx-ldap-auth-servicenginx-ldap-auth-serviceprovides a daemon (nginx-ldap-auth) that
communicates with an LDAP or Active Directory server to authenticate users with
their username and password, as well as a login form for actually allowing users
to authenticate.  You can use this in combination with the nginx modulengx_http_auth_request_moduleto provide authentication for your nginx server.See theDocumentationfor more
information.
Package: nginxlib
Python nginx Log ParserParse nginx logs with Python.Free software: MIT license<! – Docs not yet published
* Documentation:https://nginxlib.readthedocs.io.
–>This package parses nginx logs and provides a Python
object representing each log. It also has some procedures
to aggregate log data.InstallationWith pip:$pipinstallnginxlibFor development:$pythonsetup.pydevelopRun the tests:$maketestFeaturesParse a discrete nginx log entry to a Python objectAggregate log dataUsageGiven this nginx log entry:` 96.49.212.83 - - [16/Jun/2019:22:52:21 +0000] "GET /vs/editor/editor.main.nls.js HTTP/1.1" 200 34027"https://3000-98358490.staging-avl.appsembler.com/""Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:67.0) Gecko/20100101 Firefox/67.0""-"# noqa E503 `theentryparseobject will behave as follows:>>>fromnginxparserimportentryparse>>>entry=entryparse(log_string)>>>entry.timestampdatetime.datetime(2019,6,16,23,54,5,624139)>>>entry.urlParseResult(scheme='https',netloc='3000-98358490.staging-avl.appsembler.com',path='',params='',query='',fragment='')>>>entry.deploy_id'98358490'CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Inspired by and forked from:https://code.richard.do/explore/projects.History0.1.0-alpha (2019-06-17)First release on PyPI.Port the original repoAdd procedures to parse discrete logs
Package: nginx-manager
ngmNGINX dynamic modules and websites manager.Managing your NGINX modulesThe GetPageSpeed repository users have convenient access to over a hundred of NGINX module packages,
viaNGINX Extras collection.We realize the need of both our customers and users of other NGINX module collections, to
efficiently manage their installed set of NGINX modules.The NGINX Manager utility (ngm) provides an easy way to list installed or available NGINX modules,
and look up their respectiveload_moduledirectives.UsageList installed modulesngmlistSample output:+--------------+---------------------------------------+-----------+-------------------------------------------------------------+
| Module ID    | Feature Summary                       | Enabled   | Load Directive used by "ngm enable "             |
|--------------+---------------------------------------+-----------+-------------------------------------------------------------|
| security     | Modsecurity v3 nginx connector        | No        | load_module modules/ngx_http_modsecurity_module.so;         |
| pagespeed    | Pagespeed dynamic module for nginx    | Yes       | load_module modules/ngx_pagespeed.so;                       |
| doh          | Serving dns-over-https (doh) requests | Yes       | load_module modules/ngx_http_doh_module.so;                 |
| headers-more | Nginx headers more dynamic module     | Yes       | load_module modules/ngx_http_headers_more_filter_module.so; |
| echo         | Nginx echo module                     | Yes       | load_module modules/ngx_http_echo_module.so;                |
+--------------+---------------------------------------+-----------+-------------------------------------------------------------+Alternative, lengthier syntax to run the same isngm list installed.Enable an installed modulengmenable<moduleid>For example:ngmenableheaders-moreThis will do the following:Add respectiveload_moduledirective at the top of yournginx.confconfiguration fileRunsystemctl reload nginxList installable modulesThis command list modules available for installation via GetPageSpeed repositories:ngmlistavailableInstallationCentOS/RHEL and other RPM-based systemsyum-yhttps://extras.getpagespeed.com/release-latest.rpm
yum-yinstallngmOther systemspipinstallnginx-managerGoals for futureModulesngm list enabledto see what modules are enabled vianginx -Tand parsingload_moduledirectivesngm disable <module-name>auto-complete for modulesngm compile --i-know-i-should-use-packages-instead github/blahngm listto display modules based on modules dir, then look up viarpm -qlall the.soinstead of.jsondatabasengm listshould display latest versionslastversion, this requires look up URL: viarpmWebsitesCreate sites from Jinja templates (absorb idea fromhttps://github.com/dvershinin/pyNginx)ngm sites listngm sites create wordpress example.comngs listorngxs list?
Package: nginxparser
Installation:pip install nginxparserUsing log format:log_format myformat '$remote_addr - [$time_local] "$host" "$request" '
                    '$status ($bytes_sent) "$http_referer" '
                    '"$uri $args" [$request_time] [$upstream_response_time]';usage:nginxparser [-h] [--uri] [--time] [--clients] [--grep GREP] [--dump DUMP]
            [--no_report] [--debug]
            log_fileoptional arguments:-h, --help            show this help message and exit
--uri, -u             Get uri-based report
--time, -t            Get time-based report
--clients, -c         Get client-based report
--grep GREP, -g GREP  Grep lines, where 'upstream_time' more than the
                      specified
--dump DUMP, -d DUMP  Export parsed data to the json.file
--no_report, -N       Don't print the report
--debug, -D           Print not parsed linesexamples:nginxparser --uri /path/to/access_nginx.log
nginxparser --time /path/to/access_nginx.log
nginxparser --clients /path/to/access_nginx.log
nginxparser --grep 10 /path/to/access_nginx.log
nginxparser -utcN -d out.json /path/to/access_nginx.log
Package: nginxparser_eb
An nginx configuration parser that uses Pyparsing.You can parse a nginx configuration file withloadorloadsmethod:>>>fromnginxparser_ebimportload>>>load(open("/etc/nginx/sites-enabled/foo.conf"))[['server'],[['listen','80'],['server_name','foo.com'],['root','/home/ubuntu/sites/foo/']]]]Same as other serialization modules also you can export configuration
with>>>fromnginxparser_ebimportload>>>load(open("/etc/nginx/sites-enabled/foo.conf"))[['server'],[['listen','80'],['server_name','foo.com'],['root','/home/ubuntu/sites/foo/']]]]Same as other serialization modules also you can export configuration
withdumpanddumpsmethods.>>>fromnginxparser_ebimportdumps>>>dumps([['server'],[['listen','80'],['server_name','foo.com'],['root','/home/ubuntu/sites/foo/']]])'server {listen80;server_namefoo.com;root/home/ubuntu/sites/foo/;}'InstallationThe Nginx parser is now available via pip:pip install nginxparser_ebTroubleshootingException like this may occur:ParseException: Expected {Group:({W:(ABCD...) [{Suppress:(<SPC><TAB><CR><LF>) !W:({};)}] Suppress:(";")}) | Forward: ...} (at char 0), (line:1, col:1)It may be caused by importing Cmd2 package which modifies pyparsing globals. In particular, the following code causes
the trouble:pyparsing.ParserElement.setDefaultWhitespaceChars('\t')In this setting the pyparser parser stops parsing after a new line.From this reason, importing pyparsing modifies set white space chars back topyparsing.ParserElement.setDefaultWhitespaceChars("\n\t\r")CreditsBased on thehttps://github.com/fatiherikli/nginxparserand CertBot Nginx parser.
Package: nginxproxymanager
nginxproxymanager-py (nginxproxymanageron PyPI)nginxproxymanager-py is a Python wrapper/scraper for the backendNginx Proxy ManagerAPI.Supports both sync and async calls to each function.Right now, this package only supports the following functions:AuthenticationProxy host managementUser managementSettings managementAPI StatusIn the future, the following features are planned. (Be warned- I'll probably add these as I need them in projects. Who knows how long that will take.)Redirection host managementDead host managementStream ManagementAccess List ManagementSSL Certificate Management
Package: nginxpy
NGINXpyEmbed Python in NGINX.Free software: Apache Software License 2.0Documentation:https://nginxpy.readthedocs.io.FeaturesStandard Python package with Cython extensionAutomatically build into NGINX dynamic module for current NGINX installRun embeded Python in NGINX worker processesWrite NGINX modules in Python or CythonPythonloggingmodule redirected to NGINXerror.log(ongoing) NGINX event loop wrapped as Pythonasynciointerface(TBD) Python and Cython interface to most NGINX code(TBD) Adapt NGINX web server to WSGI, ASGI and aiohttp interfacesInstallationInstall NGINX in whatever way, make surenginxcommand is available.pip install nginxpy, or get the source and runpip install .. You
may want to add the-voption, because the process is a bit slow
downloading Cython, NGINX source code and configuring it. The usualpython setup.py installcurrently doesn’t work separately - you should runpython setup.py buildfirst.Runpython-c'import nginx'to get NGINX configuration hint.Update NGINX configuration accordingly and reload NGINX.See NGINXerror.logfor now.DevelopmentInstall NGINX in whatever way, make surenginxcommand is available.Checkout source code.Runpython setup.py buildandpython setup.py develop.Runpython-c'import nginx'to get NGINX configuration hint.Update NGINX configuration accordingly and reload NGINX.See NGINXerror.logfor now.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-11-30)First release on PyPI with asyncio sleep demo.
Package: nginx-set-conf-equitania
Nginx-set-conf====================================================================================This is a simple python library that helps you to create configurations for different docker based applications with nginx as reverse proxy.InstallationNginx-set-conf requiresPython (>= 3.8)click (>= 8.1.3)PyYaml (>= 5.4.1)Use the package managerpipto install nginx-set-conf.pipinstallnginx-set-conf-equitaniaUsage$nginx-set-conf--help
usage:nginx-set-conf[--help][--config_template][--ip][--domain][--port][--cert_name][--pollport][--redirect_domain][--auth_file][--config_path]Options:--config_templateTEXTInserttheconf-template.Wesupport:-ngx_code_server(code-serverwithssl)-ngx_fast_report(FastReportwithssl)-ngx_mailhog(MailHogwithssl)-ngx_nextcloud(NextCloudwithssl)-ngx_odoo_http(Odooonlyhttp)-ngx_odoo_ssl(Odoowithssl)-ngx_pgadmin(pgAdmin4withssl)-ngx_portainer(NextCloudwithssl)-ngx_pwa(ProgressiveWebAppwithssl)-ngx_redirect(RedirectDomainwithoutssl)-ngx_redirect_ssl(RedirectDomainwithssl)--ipTEXTIPaddressoftheserver--domainTEXTNameofthedomain--portTEXTPrimaryportfortheDockercontainer--cert_nameTEXTNameofcertificate--pollportTEXTSecondaryDockercontainerportforodoopollings--redirect_domainTEXTRedirectdomain--auth_fileTEXTUseauthfileforhtAccess--config_pathTEXTYamlconfigurationfolder--helpShowthismessageandexit.Example# Execution with config filenginx-set-conf--config_pathserver_configf.e.nginx-set-conf--config_path=$HOME/docker-builds/ngx-confExecution without config filenginx-set-conf--config_templatengx_odoo_ssl--ip1.2.3.4--domainwww.equitania.de--port8069--cert_namewww.equitania.de--pollport8072Create your certcertbotcertonly--standalone--agree-tos--register-unsafely-without-email-dwww.equitania.deInstall certbot on Debian/Ubuntu withapt-getinstallcertbotCreate your auth fileInstall htpasswd on Debian/Ubuntu withapt-getinstallapache2-utils
htpasswd-c/etc/nginx/.htaccess/.htpasswd-userUSERnginx template settingsYou can download our settings:nginx.confand the :nginxconfig.io.zipbased onhttps://www.digitalocean.com/community/tools/nginxThis project is licensed under the terms of theAGPLv3license.
Package: nginx-sso-dpaw
This project is a library of Nginx configuration to undertake single-sign-on
withinDepartment of Parks and Wildlifeinternal applications.Installation (Django applications)Install via pip:pip installnginx-sso-dpawAt the end of settings.py, add the following codetry:import nginx_sso.django
nginx_sso.django.config(globals())except:passWhen nginx sso is disablednginx sso app is not installedSet “SSO_ENABLED” to False in .env fileThe middleware “django.contrib.auth.middleware.AuthenticationMiddleware” is not configured