Overview
inifaction makes possible to write an INI style file and setup a Webfaction project with it through Webfaction’s API.
It has a command line utility but it’s possible to also use the API implementation of inifaction as a module.
Command line utility
Create a template to configure a project:
inifaction template -f config.ini
After making the needed changes, call the API of Webfaction and setup the project:
inifaction setup -f config.ini
If any error happens, it will continue with the setup. Later on, you can setup only the section where the error happened:
inifaction setup -f config.ini -s domains
As a module
The API is created instantiating inifaction.api.API with the URL as parameter. Login requires user, password and the machine:
# Setup the API
from inifaction import API_URL
from inifaction.api import API
api = API(API_URL)
api.login('user', 'password', 'Web210')
All the configuration sections of Webfacion’s API are available at inifaction.items as items. Those items hold all the needed information to call the API with certain parameters, depending on the API’s call.
For example, we can create an email address:
from inifaction.items import Email
email = Email('example@email.net', ['example_target_mailbox', 'target@emai.net'],
autoresponder_on=True, autoresponder_subject='Hi!', autoresponder_message='Hello!',
autoresponder_from='dont-answer@email.net', script_machine='', script_path='')
Calling the item’s args function with the API call type (create, update or delete), returns the needed parameters to making that call. This happens automatically on API’s level:
# Create the email
api.create(email)
# Change the item and update it
email = email._replace(email_address='other@emai.net')
api.update(email)
# Check if it exists
api.exists(email)
# List all the emails
api.list('emails')
# Delete the email
api.delete(email)
# Delete all the emails
api.delete_all('emails')
It’s possible to subclass the default items and create customized ones, it only requires to change inifaction.SECTIONS and inifaction.NAMES values to point to the customized item.
Metadata
Release files for inifaction 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| inifaction-0.1.tar.gz | 23.4 kB | Without provenance | Details |
Release files / inifaction-0.1.tar.gz
| Download URL | inifaction-0.1.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34cbf3e16910d7ac938230936b7b3e366f7430d265092609180a28dd459fab6e
|
|
BLAKE2b-256 checksum How to use checksums |
d461a572da93ca279d59835fd9010c7dbb864f7008b9888242e6429a85ab7ed3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for inifaction 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.