json rpc – How do I solo mine with bitcoind-rpc?

I found this script: https://github.com/jgarzik/pyminer

But it uses getwork RPC call, which resulting me this:

error code: -32601
error message:
Method not found

From https://en.bitcoin.it/wiki/Getblocktemplate:

It supercedes the old getwork mining protocol.

Does it mean that getwork is no longer an option for miners? If so, how do I solo mine with getblocktemplate?

I never worked with this protocol, but from what I read on wiki, it apparently forces me to connect to pools. My task is to do solo mining by all means.

Could you please provide or refer to example Bitcoin RPC call, that would:

  1. Get a job to mine
  2. Send mined block hash with all the mined info (nonce, etc.)

If possible, please, do not refer me to third-party software like bfgminer, etc. I’m implementing my own miner, and I need to know RPC calls to do it.