Skip to main content

API to get tenders from Taiwan

Project description

Taiwan Tender API

This API allows you to search for Taiwan procurement tenders. The data is sourced from the 政府電子採購網.

Usage

available at https://tender.hlin.tw/

Installation

  1. Clone the repository:

    git clone https://github.com/hunglin59638/twtender.git
    cd twtender
    
  2. Install the dependencies:

    pip install -r requirements.txt
    
  3. Run the application:

    python -m twtender.main
    
  4. Open the browser and go to http://localhost:8000/

  5. You can also access the Swagger documentation at http://localhost:8000/docs

Docker Usage

Build and Run the Docker Container

  1. Build the Docker image:

    docker build -t twtender .
    
  2. Run the Docker container:

    docker run --rm -p 8000:8000 twtender
    

Use Pre-built Docker Image

  1. Pull the Docker image from Docker Hub:

    docker pull hunglin59638/twtender:latest
    
  2. Run the Docker container:

    docker run -p 8000:8000 hunglin59638/twtender:latest
    

Endpoints

Search Tenders

GET /

Query Parameters

https://tender.hlin.tw/docs

  • tender_name (Optional): Name of the tender.
  • tender_id (Optional): ID of the tender.
  • org_id (Optional): ID of the organization.
  • start_date (Optional): Start date in the format 'yyyy/mm/dd'.
  • end_date (Optional): End date in the format 'yyyy/mm/dd'.
  • p (Optional): Page number (default: 1).
  • page_size (Optional): Number of results per page (default: 100).
  • format (Optional): Response format, either 'json' or 'html' (default: 'html').
Example Request
curl -X GET "http://localhost:8000?start_date=2023/01/01&end_date=2023/12/31&format=json"
{
  "標案編號": ["12345", "67890"],
  "標案名稱": ["Example Tender 1", "Example Tender 2"],
  // ...other fields...
}

Project details


Download files

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

Source Distribution

twtender-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

twtender-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file twtender-0.1.0.tar.gz.

File metadata

  • Download URL: twtender-0.1.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.6

File hashes

Hashes for twtender-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c1f3ca328c79cf4672f337e245d370ed0a6749fa407ca3f5548626b488e72dbb
MD5 0cfd132f25a546c4bba34623041877ee
BLAKE2b-256 b294320bc769b142c6b8423760a25d8900865964a56db29656cededf5b5886a5

See more details on using hashes here.

File details

Details for the file twtender-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: twtender-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.6

File hashes

Hashes for twtender-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8298551e2af9ec3a68234ee357307f7b6ec0ad712057a1fe2ac9d79e9702bb19
MD5 80889b5bbc0423959d8c1187a45dd471
BLAKE2b-256 a4f10b73c734605dfcde698ed3756dc07ad15ea40ffd3f0649c99d7e853e10a4

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