Skip to main content

Simple restfull mockup server

Project description

Important

This tool does not have any security checks in place. Do not use it for live systems or in any environment outside of your development setup.

AnyServer

This is a lightweight, simple, and dependency-free mockup RESTful API server that can be used right out of the box. It is designed to assist developers in creating a RESTful frontend when the backend may not be available for testing or use. One of the standout features of this server is its easy integration with mitmproxy, although this functionality will not be documented at this time. Any server is also useful for storing data collection gathered from various sources and can convert it into AXP. Can replicate certain functionalities without human intervention.

Usage

The server is available in two versions: a single-file version (server.py) and the complete source code in the "include" directory. It is recommended to use the single-file version with command line options.

python3 anyserver.py --port 8999 --host localhost

python3 anyserver.py -h

Data storage method

Any server offers two types of data storage: JSON files and GNUDB. The JSON store saves data in small JSON files while keeping it in memory, ensuring a fast response time for testing purposes. On the other hand, GNUDB stores everything in its native format, making it ideal for larger data collections. Additionally, SQLITE support will be added in the future

python3 anyserver.py --store_type dbm --port 8999 --host localhost

Please remember

This tool is intended for local use only. It has not undergone third-party security audits and should not be used in a live environment.

Alternatives

FAQ

Why Python?

I previously built several tools based on Node.js for this purpose, such as statusBuffer, predataBuffer, and prodataBuffer. However, Node.js has changed significantly over time. Because of the lightweight nature of Node.js, the typescript, the time : code updates now take weeks to complete. Since the performance benefits of Node.js are no longer as pronounced, I've found rewriting in Python to be a more logical choice. Python is preinstalled on most systems and offers various features that make it appealing for tool development, including support for writing compressed files, the shelve, dbm, and SQLite (I know I know). Additionally, the MITM proxy is written in Python. For these reasons, creating a new tool in Python seems like a much more logical..

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

restfullmonkey-0.0.1.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

restfullmonkey-0.0.1-py2.py3-none-any.whl (26.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file restfullmonkey-0.0.1.tar.gz.

File metadata

  • Download URL: restfullmonkey-0.0.1.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for restfullmonkey-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dcb5f7332fff9802fdd8181524f2073726aa84b7d909b2810e6268f6278a4508
MD5 e6e8a42985e1e59ff96ce712daed821c
BLAKE2b-256 e41132400c630d58f4f18252e045c329ca7023e29eff5d33a2425c5bcad9320d

See more details on using hashes here.

File details

Details for the file restfullmonkey-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for restfullmonkey-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fd09aa570e580bbd56b305fb29ba1b5dddf24924ec7090cdf11cd9fc9963acb2
MD5 2218857c57014ef02605ffce28be6e1e
BLAKE2b-256 1ebb1de23c833f63a84f0e30a1ab0ea31f858bd32ab184cb76250f180b6e7547

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page