# w3bsite
Author(s): Daan van den Bergh.<br>
Copyright: © 2020 Daan van den Bergh All Rights Reserved.<br>
Supported Operating Systems: macos & linux.<br>
<br>
<br>
<p align="center">
<img src="https://raw.githubusercontent.com/vandenberghinc/public-storage/master/vandenberghinc/icon/icon.png" alt="Bergh-Encryption" width="50">
</p>
## Table of content:
* [Description](#description)
* [Installation](#installation)
* [Troubleshooting](#troubleshooting)
* [Setup.](#setup.)
* [Code Examples](#code-examples)
# Description:
Website library.
# Installation:
Install the package.
pip3 install w3bsite --upgrade
# Troubleshooting:
#### Apple Silicon M1:
##### Failed to install grpcio
arch -arch x86_64 /usr/bin/python3 -m pip install firebase-admin
# Setup.
#### Namecheap.
1: Go to https://namecheap.com and sign up / sign in. <br>
2: Link a credit card to your account. <br>
3: $50 balance is required to activate the developer api, so add balance if you did not reach this limit yet. <br>
4: Enable the developer API. <br>
5: Whitelist your public ip (https://aruljohn.com). <br>
6: Note / copy the api key which will be required later. <br>
#### /website.py
Create a file named "website.py" in your website's root directory.
my-website/
website.py
/
Add the following code to the file.
```python
#!/usr/bin/env python3
from w3bsite import Website
from dev0s import *
website = Website(
...
)
if __name__ == "__main__":
website.cli()
```
# Code Examples:
### Table of content:
- [__Customers__](#customers)
* [check](#check)
* [create](#create)
* [delete](#delete)
* [get_id](#get_id)
* [get](#get)
* [get_cards](#get_cards)
* [create_card](#create_card)
* [delete_card](#delete_card)
- [__Database__](#database)
* [load](#load)
* [save](#save)
* [delete](#delete-1)
* [join](#join)
* [names](#names)
- [__Deployment__](#deployment)
* [start](#start)
* [stop](#stop)
* [restart](#restart)
* [status](#status)
* [reset_logs](#reset_logs)
* [tail](#tail)
* [configure](#configure)
* [deploy](#deploy)
* [generate_tls](#generate_tls)
* [activate_tls](#activate_tls)
* [bundle_tls](#bundle_tls)
* [check_dns](#check_dns)
- [__Django__](#django)
* [start](#start-1)
* [create](#create-1)
* [create_app](#create_app)
* [migrations](#migrations)
* [collect_static](#collect_static)
- [__Email__](#email)
* [login](#login)
* [send](#send)
- [__FireStore__](#firestore)
* [list](#list)
* [load](#load-1)
* [load_collection](#load_collection)
* [save](#save-1)
* [delete](#delete-2)
- [__Firebase__](#firebase)
- [__Logging__](#logging)
* [log](#log)
- [__Namecheap__](#namecheap)
* [check_domain](#check_domain)
* [get_domains](#get_domains)
* [get_info](#get_info)
* [get_dns](#get_dns)
* [check_dns](#check_dns-1)
* [set_dns](#set_dns)
* [add_dns](#add_dns)
* [tag_dns](#tag_dns)
* [get_sld_and_tld](#get_sld_and_tld)
* [get_tls](#get_tls)
* [create_tls](#create_tls)
* [activate_tls](#activate_tls-1)
- [__Plans__](#plans)
* [get](#get-1)
* [create](#create-2)
- [__RateLimit__](#ratelimit)
* [increment](#increment)
* [verify](#verify)
- [__Security__](#security)
* [generate_tls](#generate_tls-1)
* [set_secret_env](#set_secret_env)
* [get_secret_env](#get_secret_env)
- [__Stripe__](#stripe)
* [check](#check-1)
* [get_product_id](#get_product_id)
* [get_plan_id](#get_plan_id)
* [get_product_id_by_plan_id](#get_product_id_by_plan_id)
* [get_product_name](#get_product_name)
* [get_plan_name](#get_plan_name)
- [__Subscriptions__](#subscriptions)
* [create](#create-3)
* [get](#get-2)
* [cancel](#cancel)
- [__Users__](#users)
* [get](#get-3)
* [create](#create-4)
* [update](#update)
* [delete](#delete-3)
* [verify_id_token](#verify_id_token)
- [__VPS__](#vps)
* [configure](#configure-1)
* [deploy](#deploy-1)
- [__Website__](#website)
* [initialize](#initialize)
* [cli](#cli)
* [deploy](#deploy-2)
* [check_dns](#check_dns-2)
* [create](#create-5)
* [serialize](#serialize)
* [init_from_serialized](#init_from_serialized)
* [template](#template)
## Customers:
The website.stripe.customers object class.
``` python
# import the website.stripe.customers object class.
from classes.config import website
```
#### Functions:
##### check:
``` python
# call website.stripe.customers.check.
response = website.stripe.customers.check(
# the users email.
email=None, )
```
##### create:
``` python
# call website.stripe.customers.create.
response = website.stripe.customers.create(
# the users email.
email=None, )
```
##### delete:
``` python
# call website.stripe.customers.delete.
response = website.stripe.customers.delete(
# the stripe customer id.
id=None, )
```
##### get_id:
``` python
# call website.stripe.customers.get_id.
response = website.stripe.customers.get_id(
# the users email.
email=None, )
```
##### get:
``` python
# call website.stripe.customers.get.
response = website.stripe.customers.get(
# the stripe customer id (optional).
id=None, )
```
##### get_cards:
``` python
# call website.stripe.customers.get_cards.
response = website.stripe.customers.get_cards(
# the stripe customer id.
id=None, )
```
##### create_card:
``` python
# call website.stripe.customers.create_card.
response = website.stripe.customers.create_card(
# the stripe customer id.
id=None,
# the card holders name.
name=None,
# the card number.
number=None,
# the card expiration month.
month=None,
# the card expiration year.
year=None,
# the card cvc.
cvc=None, )
```
##### delete_card:
``` python
# call website.stripe.customers.delete_card.
response = website.stripe.customers.delete_card(
# the stripe customer id.
id=None, )
```
## Database:
The website.db object class.
``` python
# import the website.db object class.
from classes.config import website
```
#### Functions:
##### load:
``` python
# call website.db.load.
response = website.db.load(path=None)
```
##### save:
``` python
# call website.db.save.
response = website.db.save(path=None, data=None, overwrite=False)
```
##### delete:
``` python
# call website.db.delete.
response = website.db.delete(path=None, data=None)
```
##### join:
``` python
# call website.db.join.
_ = website.db.join(path)
```
##### names:
``` python
# call website.db.names.
_ = website.db.names(
# the sub path (leave None to use the root path)
path=None, )
```
## Deployment:
The website.deployment object class.
``` python
# import the website.deployment object class.
from classes.config import website
```
#### Functions:
##### start:
``` python
# call website.deployment.start.
response = website.deployment.start()
```
##### stop:
``` python
# call website.deployment.stop.
response = website.deployment.stop()
```
##### restart:
``` python
# call website.deployment.restart.
response = website.deployment.restart()
```
##### status:
``` python
# call website.deployment.status.
response = website.deployment.status()
```
##### reset_logs:
``` python
# call website.deployment.reset_logs.
response = website.deployment.reset_logs()
```
##### tail:
``` python
# call website.deployment.tail.
response = website.deployment.tail(nginx=False, debug=False)
```
##### configure:
``` python
# call website.deployment.configure.
response = website.deployment.configure(reinstall=False, log_level=0, loader=None)
```
##### deploy:
``` python
# call website.deployment.deploy.
response = website.deployment.deploy(code_update=False, reinstall=False, log_level=0)
```
##### generate_tls:
``` python
# call website.deployment.generate_tls.
response = website.deployment.generate_tls(log_level=0)
```
##### activate_tls:
``` python
# call website.deployment.activate_tls.
response = website.deployment.activate_tls(log_level=0)
```
##### bundle_tls:
``` python
# call website.deployment.bundl
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | w3bsite-4.34.8.tar.gz (105个子文件)
bash 499B
setup.cfg 38B
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.gitignore 2KB
documentation_view.html 48KB
defaults.html 22KB
purchase.html 17KB
styles.html 13KB
cancel.html 12KB
base.html 9KB
firebase.html 7KB
reset.html 4KB
activate.html 3KB
topbar.html 3KB
privacy_policy.html 3KB
signup.html 3KB
signin.html 3KB
requests.html 3KB
header.html 2KB
activation.html 2KB
reset_password.html 2KB
authentication.html 2KB
error.html 1KB
500.html 1KB
examples.html 1KB
maintenance.html 1KB
permission_denied.html 1KB
404.html 1013B
requests.html 580B
view.html 243B
products.html 243B
product.html 243B
favicon.ico 118KB
MANIFEST.in 648B
installer 6KB
installer 5KB
json 761B
README.md 26KB
README.md 26KB
README.md 46B
django.nginx 2KB
not-zip-safe 1B
requirements.pip 825B
PKG-INFO 257B
PKG-INFO 257B
__init__.py 38KB
__init__.py 36KB
docs.py 34KB
__init__.py 30KB
__init__.py 21KB
__init__.py 18KB
__init__.py 13KB
__init__.py 12KB
__init__.py 12KB
requests.py 11KB
__init__.py 11KB
defaults.py 10KB
requests.py 10KB
__init__.py 10KB
__init__.py 8KB
__init__.py 5KB
__init__.py 5KB
settings.py 4KB
__init__.py 3KB
__init__.py 3KB
__init__.py 2KB
views.py 2KB
__init__.py 2KB
products.py 2KB
urls.py 1KB
views.py 1KB
__init__.py 1KB
__init__.py 1KB
requests.py 1KB
views.py 1KB
__init__.py 917B
requests.py 797B
setup.py 768B
views.py 758B
manage.py 637B
wsgi.py 403B
asgi.py 403B
__init__.py 353B
__init__.py 302B
__init__.py 235B
__init__.py 144B
__init__.py 96B
__init__.py 63B
__init__.py 57B
__init__.py 40B
__init__.py 36B
__init__.py 0B
gunicorn.service 246B
gunicorn.socket 118B
start 544B
SOURCES.txt 4KB
共 105 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功