GeoUsage是一个纯Python包,用于读取和写入NASA南半球ADditional OZonesondes (SHADOZ)数据。
项目描述
GeoUsage
OGC网络服务的指标分析
概述
GeoUsage是一个纯Python包,提供OGC网络服务使用分析。
安装
安装GeoUsage的最简单方法是使用pip
pip install GeoUsage
这假设您有权在您的系统上安装GeoUsage,这可能需要管理员/根权限。对于隔离安装,请参阅在虚拟环境中安装GeoUsage。
要求
- Python 3
- virtualenv
依赖项
依赖项列在requirements.txt中。依赖项在安装GeoUsage时自动安装。
在虚拟环境中安装GeoUsage
使用虚拟环境可以实现隔离安装,不会影响需要管理员/根权限的系统级依赖项。要将GeoUsage安装到虚拟环境中,请执行以下步骤
# setup virtualenv
python3 -m venv GeoUsage
cd GeoUsage
source bin/activate
# clone codebase and install
git clone https://github.com/geopython/GeoUsage.git
cd GeoUsage
python3 setup.py install
运行
cp GeoUsage-config.env local.env
vi local.env # update environment variables accordingly
# help
GeoUsage --help
# get version
GeoUsage --version
# perform WMS analysis on an Apache logfile on any WMS endpoint
GeoUsage log analyze --service-type=OGC:WMS --logfile </path/to/apache_logfile>
# perform WMS analysis on an Apache logfile on a specific WMS endpoint
GeoUsage log analyze --service-type=OGC:WMS --endpoint=/ows --logfile </path/to/apache_logfile>
# perform WMS analysis on an Apache logfile for a single date
GeoUsage log analyze --service-type=OGC:WMS --endpoint=/ows --logfile </path/to/apache_logfile> --time=2018-01-26
# perform WMS analysis on an Apache logfile for a date range
GeoUsage log analyze --service-type=OGC:WMS --endpoint=/ows --logfile </path/to/apache_logfile> --time=2018-01-26/2018-01-27
# perform WMS analysis on an Apache logfile for a single datetime
GeoUsage log analyze --service-type=OGC:WMS --endpoint=/ows --logfile </path/to/apache_logfile> --time=2018-01-26T11:11:11
# perform WMS analysis on an Apache logfile for a datetime range
GeoUsage log analyze --service-type=OGC:WMS --endpoint=/ows --logfile </path/to/apache_logfile> --time=2018-01-26T11:11:11/2018-01-27T12:32:11
# resolve IP addresses
GeoUsage log analyze --service-type=OGC:WMS --endpoint=/ows --logfile </path/to/apache_logfile> --verbosity=INFO --resolve-ips
# show top 10 unique IPs and top 10 layers
GeoUsage log analyze --service-type=OGC:WMS --endpoint=/ows --logfile </path/to/apache_logfile> --verbosity=INFO --resolve-ips --top=10
# add verbose mode
GeoUsage log analyze --service-type=OGC:WMS --endpoint=/ows --logfile </path/to/apache_logfile> --verbosity=INFO
# query a Mailman mailing list member count
GeoUsage mailing_list member_count
使用API
from GeoUsage.mailman import MailmanAdmin
ma = MailmanAdmin('http://example.org/mailman/admin/list', 'secret')
print(ma.member_count)
开发
运行测试
# install dev requirements
pip install -r requirements-dev.txt
# run tests like this:
python3 GeoUsage/tests/run_tests.py
# or this:
python3 setup.py test
# measure code coverage
coverage run --source=GeoUsage -m unittest GeoUsage.tests.run_tests
coverage report -m
发布
python3 setup.py sdist bdist_wheel --universal
twine upload dist/*
代码约定
错误和问题
所有错误、增强和问题都在GitHub上管理。
联系
项目详情
下载文件
下载您平台所需的文件。如果您不确定选择哪一个,请了解更多关于 安装包的信息。
源分布
GeoUsage-0.1.0.tar.gz (9.6 kB 查看散列值)
构建分布
GeoUsage-0.1.0-py2.py3-none-any.whl (11.6 kB 查看散列值)
关闭
GeoUsage-0.1.0.tar.gz的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 2a4be407f2c3d2e3b1fe0bea65467a5a52d4a230435eb7b53df21df2c9087f20 |
|
MD5 | fb70e1d91405d3a09b7fb6c3ca34bb7d |
|
BLAKE2b-256 | 74628cb26454cfd11dfca6b726995b37de4a1c8370a2811759a05e3d8cb3ad8c |
关闭
GeoUsage-0.1.0-py2.py3-none-any.whl的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 71b16f7aebe7f7ec597d4ce07c44cc83181584920056ca39715129e444ad81b9 |
|
MD5 | c2524786213154dd853bae8962eb8ffa |
|
BLAKE2b-256 | 8aacfc0a968118ecf2ee7fc709b1ebf29664e250dd6f6f82fea32d3bdc3022e4 |