Skip to main content

client for interracting with camden website using api

Project description

Camden Registration MicroService

About

Service to use wrapper on requests api to simulate user actions on the Camden Activity Registration portal

Running environment

Python > 3.9

Running python code

To install:

pip3 install camden_registration_api

And create your own runner file my_camden.py like below:

from camden_registration_api import CamdenClient

api_client = CamdenClient(
        login=<your login>,
        password=<your password>,
        activity_id=120589,
    )

# to run test registration
api_client.test()


# to run actual registration
api_client.register()

Then execute as normal python code:

python3 my_camden.py

Running containerized application

Using localhost Docker runtime

  • Build:
docker build -t polovinko1980/camden-registration:develop.latest -f camden.DockerFile .

Create docker.env file with MongoDB credentials and trigger:

docker run -d --name camden-registration --env-file docker.env polovinko1980/camden-registration:develop.latest python camden_registration_runner.py

Using AWS cloud resources

  • Navigate to terraform folder

  • Execute:

terraform apply -auto-approve

Note: you need to have secrets manager configured o n your account with credentials to connect to datasource (mongoDB).

Using other datasources like FB messenger or telegram WIP still.

  • connect to instance and check:
cat /var/log/cloud-init-output.log

sudo docker ps

sudo docker logs <container_id>
  • After job is done, clean up:
terraform destroy -auto-approve

Using local python runtime

  • Install dependencies:
pip3 install -r requirements.txt

  • Make sure environmental variables to connect to mongo are setup

  • Run:

python3 camden_registration_runner.py

python3 camden_registration_runner.py --force

python3 camden_registration_runner.py --test

Other

To call Camden: 1-408-559-8553

Special ask

Do not share with Alex K, let him train his fingers

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

camden_registration_api-1.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

camden_registration_api-1.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file camden_registration_api-1.1.0.tar.gz.

File metadata

  • Download URL: camden_registration_api-1.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0

File hashes

Hashes for camden_registration_api-1.1.0.tar.gz
Algorithm Hash digest
SHA256 24537957cbaf65b7eb0ab710194eeafb8de71e10b7a469c51741f39db432cce7
MD5 e7fc7aa3a789e48e5d572757d1c2a957
BLAKE2b-256 1a58e47f22b83ecba760097b570c86a76e5be81941621d8f36d86f899a11e255

See more details on using hashes here.

File details

Details for the file camden_registration_api-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for camden_registration_api-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 502d2299fe9e6c97767ae38cde45a5182ed954e4a159203fe59c54217eeb3ea5
MD5 eae19609bdc3d5ff81b28a72dd457e9d
BLAKE2b-256 f26a74b6523daab7281888c574682f3d45f92395bd68ad9380c75c28bcd1b260

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