Skip to main content

더 캠프 인터넷편지 비공식 라이브러리

Project description

PyPIGitHubGitHub Workflow Status

thecampy - 더 캠프 파이썬 라이브러리

thecampy는 parksb/the-camp-lib을 참고하여 제작된 대국민 국군 소통 서비스 더 캠프의 파이썬 라이브러리입니다.

간단한 파이썬 코드 몇줄로 인터넷 편지를 보낼 수 있도록 구현되었습니다. 매 월요일 12시(UTC) 더 캠프 request code를 테스트합니다.

첫 파이썬 라이브러리다보니 부족한 부분이 많습니다. 오류사항은 Issue 부탁드립니다.

Installation

pip install clients
pip install thecampy

Usage

import thecampy

my_soldier = thecampy.Soldier(

        [이름],

        [생일(yyyymmdd)],

        [입대일(yyyymmdd)],

)

msg = thecampy.Message([제목], [내용(1500자 이하)])

tc = thecampy.client()

tc.login(email, pw) #Prints 'Successfully Logged in'

tc.add_soldier(my_soldier) #returns True

tc.get_soldier(my_soldier) #returns soldier code

tc.send_message(my_soldier, msg) #returns True

sample

import thecampy

my_soldier = thecampy.Soldier('홍길동',20010101,20210225)

msg = thecampy.Message(['테스트 제목'], ['테스트 내용'])

tc = thecampy.client()

tc.login('test@naver.com', 'test1234@password!') #Prints 'Successfully Logged in'

tc.add_soldier(my_soldier) #returns True

tc.get_soldier(my_soldier) #returns soldier code

tc.send_message(my_soldier, msg) #returns True

주의사항

  • 더 캠프 계정은 이메일로 가입되어있어야 합니다. (카카오계정 지원 X)

  • 인터넷편지는 '예비군인/훈련병'에게만 보낼 수 있습니다.

Known Issues

  • 테스트 전송시도 약 7번중 한번꼴로 resultCd=9019 (제목에 금지 문자가 들어있습니다) 오류가 발생했습니다.

LICENSE

This project is licensed under the MIT License.

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

thecampy-1.0.7.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

thecampy-1.0.7-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file thecampy-1.0.7.tar.gz.

File metadata

  • Download URL: thecampy-1.0.7.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for thecampy-1.0.7.tar.gz
Algorithm Hash digest
SHA256 f6de71a10659ff253a34a95a8e87e9b1d26a5b0bdcf7fbf14810f9657b913025
MD5 b7c61f1430461a7b739cf9e6045986c6
BLAKE2b-256 c2e2c53b5d02747f1211d0578d3775a83d3277a3b3151f5187cdbc33e72e062e

See more details on using hashes here.

Provenance

File details

Details for the file thecampy-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: thecampy-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for thecampy-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e9d347adcbd8471826982d79c765d574f97ebbb4841489c7ea8017ce1a142592
MD5 8391a64e5a46a3b6ff7c5ced1e726148
BLAKE2b-256 2757d458209f7fa2545b1ac36b9ff5b2b4416ca2e15fd00e5cbcf38987edc69f

See more details on using hashes here.

Provenance

Supported by

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