
Security News
npm Introduces minimumReleaseAge and Bulk OIDC Configuration
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.
google-apputils
Advanced tools
This project is a small collection of utilities for building Python applications. It includes some of the same set of utilities used to build and run internal Python apps at Google.
Features:
To install the package, simply run: python setup.py install
Google-style tests (those run with basetest.main()) differ from setuptools-style tests in that test modules are designed to be run as main. Setting up your project to use Google-style tests is easy:
from google.apputils import basetest
class MyTest(basetest.TestCase): def testSomething(self): self.assertTrue('my test')
if name == 'main': basetest.main()
setup( ... setup_requires = ['google-apputils>=0.2'], test_dir = 'tests', )
Google-style binaries (run with app.run()) are intended to be executed directly at the top level, so you should not use a setuptools console_script entry point to point at your main(). You can use distutils-style scripts if you want.
Another alternative is to use google.apputils.run_script_module, which is a handy wrapper to execute a module directly as if it were a script:
from google.apputils import run_script_module
def RunMyScript(): import my.script run_script_module.RunScriptModule(my.script)
def RunMyOtherScript(): import my.other_script run_script_module.RunScriptModule(my.other_script)
setup( ... entry_points = { 'console_scripts': [ 'my_script = my.stubs:RunMyScript', 'my_other_script = my.stubs.RunMyOtherScript', ], }, )
There are also useful flags you can pass to your scripts to help you debug your binaries; run your binary with --helpstub to see the full list.
FAQs
Obsolete. Please migrate to absl-py instead.
We found that google-apputils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.

Research
/Security News
Socket uncovered four malicious NuGet packages targeting ASP.NET apps, using a typosquatted dropper and localhost proxy to steal Identity data and backdoor apps.