# 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
Raw data
{
"_id": null,
"home_page": "https://github.com/polovinko1980/camden-registration-api",
"name": "camden-registration-api",
"maintainer": "Alex Polovinko",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": "alex.polovinko@gmail.com",
"keywords": null,
"author": "Alex Polovinko",
"author_email": "alex.polovinko@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/6f/54/b4fd3e1612188847b5d247de3df0d7dd6cc706b8e2c14ef1befe2ddb2fe3/camden_registration_api-1.1.1.tar.gz",
"platform": null,
"description": "# Camden Registration MicroService\n\n\n## About\n\nService to use wrapper on requests api\nto simulate user actions\non the Camden Activity Registration portal\n\n\n## Running environment\n\nPython > 3.9\n\n\n\n# Running python code\n\n\nTo install:\n\n```\npip3 install camden_registration_api\n\n```\n\nAnd create your own runner file ```my_camden.py``` like below:\n\n```\nfrom camden_registration_api import CamdenClient\n\napi_client = CamdenClient(\n login=<your login>,\n password=<your password>,\n activity_id=120589,\n )\n\n# to run test registration\napi_client.test()\n\n\n# to run actual registration\napi_client.register()\n```\n\nThen execute as normal python code:\n\n```python3 my_camden.py```\n\n\n# Running containerized application\n\n## Using localhost Docker runtime\n\n- Build:\n\n```\ndocker build -t polovinko1980/camden-registration:develop.latest -f camden.DockerFile .\n\n```\n\nCreate ```docker.env``` file with MongoDB credentials and trigger:\n\n```\ndocker run -d --name camden-registration --env-file docker.env polovinko1980/camden-registration:develop.latest python camden_registration_runner.py\n\n```\n\n## Using AWS cloud resources\n\n- Navigate to terraform folder\n\n- Execute:\n\n```\nterraform apply -auto-approve\n```\n\nNote: you need to have secrets manager configured o\nn your account with credentials to connect to datasource (mongoDB).\n\nUsing other datasources like FB messenger or telegram WIP still.\n\n\n\n- connect to instance and check:\n\n```\ncat /var/log/cloud-init-output.log\n\nsudo docker ps\n\nsudo docker logs <container_id>\n```\n\n- After job is done, clean up:\n\n```\nterraform destroy -auto-approve\n```\n\n## Using local python runtime\n\n- Install dependencies:\n\n```\npip3 install -r requirements.txt\n\n```\n\n- Make sure environmental variables to connect to mongo are setup\n\n\n- Run:\n\n```\npython3 camden_registration_runner.py\n\npython3 camden_registration_runner.py --force\n\npython3 camden_registration_runner.py --test\n\n```\n\n\n## Other\n\nTo call Camden: 1-408-559-8553\n\n\n\n## Special ask\n\nDo not share with Alex K, let him train his fingers\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "client for interracting with camden website using api",
"version": "1.1.1",
"project_urls": {
"Homepage": "https://github.com/polovinko1980/camden-registration-api",
"Repository": "https://github.com/polovinko1980/camden-registration-api"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d6f1e116c2477223eb04f8c7c0c176961f5c489342a3397ebc46d588b1a62637",
"md5": "9368f8d76d16de5e6f59e560d44b89e9",
"sha256": "9706bae7368559711bc2216991470fb6d8232057f0e950475e49b6d36e08ea60"
},
"downloads": -1,
"filename": "camden_registration_api-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9368f8d76d16de5e6f59e560d44b89e9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 7660,
"upload_time": "2024-12-03T03:40:26",
"upload_time_iso_8601": "2024-12-03T03:40:26.112248Z",
"url": "https://files.pythonhosted.org/packages/d6/f1/e116c2477223eb04f8c7c0c176961f5c489342a3397ebc46d588b1a62637/camden_registration_api-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6f54b4fd3e1612188847b5d247de3df0d7dd6cc706b8e2c14ef1befe2ddb2fe3",
"md5": "37e35a5598fcbe43e63d1d17360262d5",
"sha256": "32778c56bd65ae35e4d93aa78c7a1c76e73e66aabbd1215d01e5340d62e3502f"
},
"downloads": -1,
"filename": "camden_registration_api-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "37e35a5598fcbe43e63d1d17360262d5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 7065,
"upload_time": "2024-12-03T03:40:27",
"upload_time_iso_8601": "2024-12-03T03:40:27.639625Z",
"url": "https://files.pythonhosted.org/packages/6f/54/b4fd3e1612188847b5d247de3df0d7dd6cc706b8e2c14ef1befe2ddb2fe3/camden_registration_api-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-03 03:40:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "polovinko1980",
"github_project": "camden-registration-api",
"github_not_found": true,
"lcname": "camden-registration-api"
}