scrivener is a Scribe client/server framework for use with Twisted applications.
Client API
from twisted.internet import reactor
from twisted.internet.endpoints import TCP4ClientEndpoint
from scrivener import ScribeClient
def main():
client = ScribeClient(TCP4ClientEndpoint(reactor, '127.0.0.1', 1234))
client.log('category', 'message1')
client.log('category', 'message2')
if __name__ == '__main__':
reactor.callWhenRunning(main)
reactor.run()
Server API
import sys
from twisted.internet import reactor
from twisted.internet.endpoints import TCP4ServerEndpoint
from twisted.python.log import startLogging
from scrivener import ScribeServerService
from scrivener.handlers import TwistedLogHandler
def main():
service = ScribeServerService(
TCP4ServerEndpoint(reactor, 1234),
TwistedLogHandler())
service.startService()
if __name__ == '__main__':
startLogging(sys.stdout)
reactor.callWhenRunning(main)
reactor.run()
Server Plugin
> twistd -n scrivener --help
Usage: twistd [options] scrivener [scrivener options]
Options:
-p, --port= Port to listen on for scribe service. [default: tcp:0]
-H, --handlerFactory= Fully Qualified Name of a callable that returns an
ILogHandler
--version Display Twisted version and exit.
--help Display this help and exit.
> twistd -n scrivener -p 1234 -H example.MyLogHandler
License
Copyright (C) 2012 Rackspace Hosting, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Metadata
Release files for scrivener 0.2
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 | |
|---|---|---|---|---|
| scrivener-0.2.tar.gz | 13.5 kB | Without provenance | Details |
Release files / scrivener-0.2.tar.gz
| Download URL | scrivener-0.2.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da1c8ae65277ee3fb76e5ba5bdd19e939022c60296935020d9157817b533d185
|
|
BLAKE2b-256 checksum How to use checksums |
5ff21109b5aec5fcd23e9533a45f904f1e36cd81cf7577b920219b34a8cf1cbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for scrivener 0.2
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.